Yes, that is the literal registry configuration!

I don't use "GetCommandLine(0)" - only "GetCommandLine(1)", returning the array.
With your code on my system, I get:
 Code:
COMPUTER - C:\Temp>mart -1 -2 -3
"C:\local\bin\kix32.exe" "C:\Temp\mace.kix"  -1 -2 -3
Parameters 0="C:\local\bin\kix32.exe"
Parameters 1="C:\Temp\mart.kix"
Parameters 2=
Parameters 3=-1
Parameters 4=-2
Parameters 5=-3

Last Parameter = -3

But changing
$CL=split(GetCommandLine(0)," ")
to
$CL = GetCommandLine(1)
returns:
 Code:
COMPUTER - C:\Temp>mart -1 -2 -3
"C:\local\bin\kix32.exe" "C:\Temp\mace.kix"  -1 -2 -3
Parameters 0=C:\local\bin\kix32.exe
Parameters 1=C:\Temp\mart.kix
Parameters 2=-1
Parameters 3=-2
Parameters 4=-3

Last Parameter = -3

Which seems to be more what you want, isn't it?

I removed the Quit() from the end for this test, which should really be "Quit 0" if you actually need it. Also - I don't understand the "IsDeclared(CL)" statement. You're implicitly declaring it with the statement $CL=GetCommandLine(0), so that test will always be true.

If you look at my code, I'm using IsDeclared to determine if a var called ARG was passed on the command line (kix32 MyScript $ARG=xxx). If it wasn't, than $ARG is created via the GetCommandLine function. You can simplify your code to:
 Code:
break on

; Illustrate the full command line string
'Comand line is: ' GetCommandLine(0) ?

; Load the Command Line array
$CL = GetCommandLine(1)

; Show count of args
UBound($CL) - 1 ' arguments were passed' ?

; process the args if any were passed
If UBound($CL) - 1 
  for $X = 2 to UBound($CL)
    "Parameter " $x-1 "=" $CL[$X] ?
  next
  "Last Parameter = "+$CL[UBound($CL)] ?
EndIf


Try this without args, with "tom dick harry" as args, then repeat the command line with single and then double "-" in front of each arg. You'll get 3 different results! First will complain that the script Tom isn't found (no Quit 0), then it will see the "T" in "Tom" and try to tokenize "Dick". Finally, it will pass ALL of the args to the script without error or complaint.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D