Gang:KiX needs some type checking functions like isstring(), isnumeric() and isassigned(). Does anyone agree ?
I mean - it's not so much a problem with internal variables (assigned/used inside the script) - but when you have a script that excepts command line arguments - it would be nice to know what your dealing with.
To demonstrate the need for these functions and for those who like a challenge - here's today's excerise ...
Write a script called "echo.kix" that excepts one command line argument - namely $arg - and echo's out to the screen EXACTLY what was specified on the command line !
Example:
c:\> kix32 echo.kix $arg=(whatever)
echo: $arg=(whatever)
c:\>
hint: The challenge is to differenciate between the following...
$arg="" from $arg=0 from $arg= and $arg not specified
As well, make sure you check for that pesky $arg
Maybe by doing this - we can establish some rules on how KiX treats unassigned variables and how we can more effectively type check !
Shawn.
p.s. Has anybody been able to duplicate that $arg "bug" or am I just being a doh-head ?