Counting exec arguments?

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

paues
Posts: 218
Joined: Fri Apr 15, 2011 7:16 am
Location: Stockholm, Sweden

Counting exec arguments?

Postby paues » 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:

Code: Select all

exec "myNeatFile.prg" arg1 arg2 arg3
and myNeatFile.prg contains inter alia this snippet, which I would believe would count the arguments for me, but simply returns !i=-1:

Code: Select all

!i=0 while @neqna(%{!i},"") !i=!i+1 wend !i=!i-1 @uiprompt("!i="+@str(!i))
Help would be much appreciated.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Counting exec arguments?

Postby EViews Gareth » Wed Apr 10, 2013 9:11 am

@wcount(%args)

andreselsuave
Posts: 1
Joined: Thu Jun 19, 2014 6:47 am

Re: Counting exec arguments?

Postby andreselsuave » Thu Jun 19, 2014 6:49 am

Is this feature documented? I can't find it in the 7.2 version's documentation

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Counting exec arguments?

Postby EViews Gareth » Thu Jun 19, 2014 6:51 am

Not in the EViews 7 documentation


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests