infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Cloverleaf
wrong # args
System
Originally posted by Rick Pritchett
should i be using some string command in the while instead
errorInfo:
wrong # args: should be "while test command"
Find more posts tagged with
Clovertech
Comments
Jim Kosloskey
Rickie,
I do this:
while {$whatever != ""} {
other tcl stuff
}
Rather than :
while {$whatever != ""}
{ other tcl stuff
}
I think the while command needs to see the open curly brace for the scrit to be executed on the same line as the while command.
Jim Kosloskey
Charlie Bursell
Jim:
Please don't tell these guys to use a numerical compare when comparing strings. I know it's hard to teach an old dog like you new tricks but I think there is hope for the others
It is *MUCH* more ergonomic, and might avoid conversion problems, to use the string command like:
if {[string equal $var ""]}
Or even better since an empty list and an empty string are the same:
if {[lempty $var]}
You can get by with this most of the time in Tcl but it is slower. However, if you get used to doing it that way then enter something like !- =foo in Xlate, it will not work. So it is best to use string commands for string compares and numerical compares for numbers.
Finished with my soapbox now
Jim Kosloskey
Charlie,
I agree with you regarding using string functions and I tend to use them.
However, in this case I was trying to show the structural error of the placement of the curly braces (and how that might be corrected) not address the issue of trying to correct the compare technique.
Jim Kosloskey
Charlie Bursell
Just pulling your string Jim