Originally posted by Ian Morris
I'd like to know if there's a way to dynamically argumentize a TCL proc. For example, let's say I pass these arguments to my .tcl filter:
{SEGMENT EVN} {FIELDNUMBER 5} {SEARCHCRITERIA foot}
In my filter, I then have to go in and look for the value of these arguements like this:
keylget uargs SEGMENT segm
keylget uargs FIELDNUMBER fieldnum
keylget uargs SEARCHCRITERIA searchcrit
What if I wanted to dynamically pass my arguments? So, maybe include the ability to do this:
{SEGMENT EVN} {FIELDNUMBER 5} {SEARCHCRITERIA foot}
{DECISION and}
{SEGMENT MSH} {FIELDNUMBER 4} {SEARCHCRITERIA ANESAPP}
{DECISION or}
{SEGMENT MSH} {FIELDNUMBER 9} {SEARCHCRITERIA A08}
Ideally, I would create arrays for SEGMENT, FIELDNUMBER, DECISION. But, it look like that's not possible (
http://wiki.tcl.tk/3262):
Entire arrays, however, are not currently able to be passed by value to a Tcl procedure...Does anyone have an idea of what may be possible here?