Hey,
I have a program that extracts certain information of different matrices. I want it to be flexible and take as many matrices as the user wants. Is there a way to use a "flexible" number of arguments and let the program figure out how many arguments it got?
Thanks in advance!
Best,
Thomas
Flexible number of arguments
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Flexible number of arguments
All EViews programs have a flexible number of arguments, so it isn't really clear what you're asking.
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Flexible number of arguments
If you are running a program, %arg is a string with all the arguments separated by spaces. There isn't an equivalent for subroutines. It might be nice to have the equivalent of Matlab's nargin and vargin, but I don't think EViews has one.
Re: Flexible number of arguments
Sorry, should've formulated my question in a different way. My question was more about finding out how many arguments the user passed to the program.All EViews programs have a flexible number of arguments, so it isn't really clear what you're asking.
Thanks, that really helps. I'll just use @wcount to get the number of arguments and then extract them (using @word).If you are running a program, %arg is a string with all the arguments separated by spaces. There isn't an equivalent for subroutines. It might be nice to have the equivalent of Matlab's nargin and vargin, but I don't think EViews has one.
Who is online
Users browsing this forum: No registered users and 1 guest
