1
큰 파일에서 두 개의 사전을 만드는 Tcl proc가 있습니다. 그것은이 같은 것입니다 :Tcl에서 여러 중첩 된 사전을 반환
나는이 두 개의 중첩 된 사전을 반환 할...
...
proc makeCircuitData {spiceNetlist} {
#read the spiceNetlist file line by line
# create a dict with multilevel nesting called elementMap that will have the following structure:
# elementMap key1 key2 value12
# elementMap keyA keyB valueAB
# and so on
# ... some other code here ...
# create another dict with multilevel nesting called cktElementAttr that will have the following structure:
# cktElementAttr resistor leftVoltageNode1 rightVoltageNode1 resValue11
# cktElementAttr resistor leftVoltageNode2 rightVoltageNode2 resValue12
# cktElementAttr inductor leftVoltageNode2 rightVoltageNode2 indValue11
# cktElementAttr inductor leftVoltageNode2 rightVoltageNode2 indValue12
# cktElementAttr capacitor leftVoltageNode2 rightVoltageNode2 capValue11
# ... so on...
}
:이 두 사전은 내 프로그램의 다른 부분에 의해 익숙해 절차 위의 유형에서 cktElementAttr 및 elementMap을.
Tcl procs에서 두 개의 사전을 반환하는 권장 방법은 무엇입니까?
감사합니다.