I am rather new to TCL. But I have a project that generates emails. The subect line may contain one to many variable based on a predefined text line.
Here is a simple case of what I'm trying to do.
I call a routine that sets a list of Items based on system conditions.
I get the subject line from my configuration file.
Lets say I get two variable from my first routine
OUT_BOUND_QUE =100
THREAD_NAME =OUT_LAB
SUBJECT = "Connection $THREAD is $OBQ records behind"
I have create two variables to use with a format command.
$STRNG = Connection %s is %s records behind
$VAR {$THREAD_NAME $OUT_BOUND_QUE}
now I run the command format "$STRNG" $VAR. Of course this dose not work. How do I get TCL to expand out the $VAR to it's contents ? Then have it run to create the Subject of my email ?
Can I do this ? How do I do it ?
Here is a simple case of what I'm trying to do.
I call a routine that sets a list of Items based on system conditions.
I get the subject line from my configuration file.
Lets say I get two variable from my first routine
OUT_BOUND_QUE =100
THREAD_NAME =OUT_LAB
SUBJECT = "Connection $THREAD is $OBQ records behind"
I have create two variables to use with a format command.
$STRNG = Connection %s is %s records behind
$VAR {$THREAD_NAME $OUT_BOUND_QUE}
now I run the command format "$STRNG" $VAR. Of course this dose not work. How do I get TCL to expand out the $VAR to it's contents ? Then have it run to create the Subject of my email ?
Can I do this ? How do I do it ?