I found this code in the script I'm modifying (see at end). Yes, I realize it could be re-written using regular expression parsing, but I digress. Because %commapos is local to this alias, I was thinking of changing this line:

set %commapos $pos(%bingocheckline,$chr(44))
to
var %commapos $pos(%bingocheckline,$chr(44))

But later on, %commapos is reassigned:

set %commapos $pos(%bingocheckline,$chr(44),2)

Do I change "set" to "var" here as well?


alias whatever {
set %commapos $pos(%bingocheckline,$chr(44))
dec %commapos
set %bingocounty1 $left(%bingocheckline,%commapos)
%commapos = $calc(%commapos * -1)
dec %commapos
dec %commapos
set %bingostate1 $right(%bingocheckline,%commapos)
set %bingostate1 $left(%bingostate1,2)
set %commapos $pos(%bingocheckline,$chr(44),2)
dec %commapos
set %bingocounty2 $left(%bingocheckline,%commapos)
%commapos = $calc(%commapos * -1)
dec %commapos
dec %commapos
set %bingostate2 $right(%bingocheckline,%commapos)
set %bingostate2 $left(%bingostate2,2)
set %strokepos $pos(%bingocheckline,$chr(47))
%strokepos = $calc(%strokepos * -1)
set %bingocounty2 $right(%bingocounty2,%strokepos)


Jim Reisert
http://www.ad1c.us/