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 Jason, EViews Moderator, EViews Matt
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13317
- 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.
Follow us on Twitter @IHSEViews
-
- Non-normality and collinearity are NOT problems!
- Posts: 3775
- 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
EViews Gareth wrote:All EViews programs have a flexible number of arguments, so it isn't really clear what you're asking.
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.
startz wrote: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.
Thanks, that really helps. I'll just use @wcount to get the number of arguments and then extract them (using @word).
Who is online
Users browsing this forum: No registered users and 28 guests