Gerry...

I've had the same problem. For example if you do a len($var) and $var wasn't defined on the command line, you get a script error. I get around this with an IF check on the command line variable first, like this...

code:

if $var
SELECT
CASE $var="one"
$num=1
CASE $var="two"
$num=2
CASE $var="three"
$num=3
CASE 1
$num=0
ENDSELECT
else
$num = 0
endif
? $num

This doesn't answer your question, but I hope it helps. Maybe KIX needs a DEF($var) type function so one can check if the variable was assigned on the command line.

Shawn.