%hasoptions and/or %equaloptions

For questions regarding programming in the EViews programming language.

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

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

%hasoptions and/or %equaloptions

Postby paues » Wed May 06, 2026 7:52 am

A called program's arguments are stored in %args. But can I check what @equaloption's and @hasoption's it was called with without know them in advance? There doesn't seem to be variables %hasoptions and/or %equaloptions

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

Re: %hasoptions and/or %equaloptions

Postby EViews Gareth » Wed May 06, 2026 9:03 am

I don't understand what you're asking here.

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

Re: %hasoptions and/or %equaloptions

Postby EViews Gareth » Wed May 06, 2026 9:08 am

But, you can return the list of options provided with the @getoptions function:

Code: Select all

%options = @getoptions
You can retrieve the ith option with @option:

Code: Select all

%firstoption = @option(1)

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

Re: %hasoptions and/or %equaloptions

Postby paues » Wed May 06, 2026 9:30 am

That’s great! Exactly what I was looking for :-)


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 3 guests