- This topic has 8 replies, 4 voices, and was last updated 9 years, 10 months ago by .
-
Topic
-
Folks. I am trying to build a more dynamic tcl proc. I want to do the following. Is it possible? I want to pass 4 values in as ARGS. SEGMENT, FIELD, EVAL, CRITERIA
they would like something like this: OBR, 4, ==, HELLO
in my proc I have:
if {$SEGMENT_$FIELD $EVAL $crit} {
echo “meets the IF: Remove it”
lappend dispList “KILL $mh”
I get this error: syntax error in expression “$SEGMENT_$FIELD $EVAL $crit”: extra tokens at end of expression
It wont use the $EVAL as an actual operator / evaluator. If I replace the variable with an actual == or >, etc it works as expected.
Thanks for any insight.
Viewing 7 reply threads
Viewing 7 reply threads
- The forum ‘Cloverleaf’ is closed to new topics and replies.