Counting exec arguments?
Posted: Wed Apr 10, 2013 8:47 am
I am writing a program file with an unspecified number of arguments and am trying to figure out how many they are. I call the file using a command such as the one below:
and myNeatFile.prg contains inter alia this snippet, which I would believe would count the arguments for me, but simply returns !i=-1:
Help would be much appreciated.
Code: Select all
exec "myNeatFile.prg" arg1 arg2 arg3Code: Select all
!i=0
while @neqna(%{!i},"")
!i=!i+1
wend
!i=!i-1
@uiprompt("!i="+@str(!i))