Programming a subroutine with absent parameters

For questions regarding programming in the EViews programming language.

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

F_Laroche
Posts: 9
Joined: Mon Jan 21, 2019 2:52 pm

Programming a subroutine with absent parameters

Postby F_Laroche » Thu Jan 24, 2019 2:04 pm

Hi,

I created the following subroutine:

subroutine haver(string %ticker, string %BD)

Is there a command that allow a parameter to be non-existant? For example, here I want my %BD parameter to have a value if it's not specified in the opening statement:

if @isobject(%BD)=0 then
%BD = "EMERGE G10 EMERGECW EMERGELA EMERGEMA EMERGEPR"
endif


Is that possible?

Thank you.

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

Re: Programming a subroutine with absent parameters

Postby EViews Gareth » Thu Jan 24, 2019 3:10 pm

Code: Select all

if @len(%bd)=0 then
'blah blah blah
endif
Follow us on Twitter @IHSEViews


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 39 guests