Originally posted by Mike Keys
I defined a variable (only part of the uproc is shown):
} elseif [cequal [crange $segment 0 2] GT1] {
set fieldList [split $segment $field_sep]
set gt1_5 [lindex $fieldList 5]
echo $gt1_5
(this returns a value) set segment [join $fieldList $field_sep]
append outbuf ${segment}r
} else if [cequal [crange $segment 0 2] PID] {
echo $gt1_5
(this returns nothing)}
The echo does not work in the PID segment area. I need to reuse the contents of $gt1_5 within the PID segment 'elseif' statement. I can pull a variable defined within the MSH 'if' statement defined earlier and use it just fine in a 'cequal' condition.