Hi,
I am wondering if eViews 8 allows default option for subroutine argument, so that when user chooses not to specify one
parameter, it will use a default vale.
for example, I am creating a bollinger band subroutine.
subroutine bollinger( series x1, scalar N, scalar K)
Can I use command below or other means to set up default value of the argument, in the way that if users don't specify then the subroutine takes 20 and 2 as default?
subroutine bollinger (series x1, scalar N=20, scalar K=2)
when users use it, ideally they can just write
call bollinger(x1)
if they don't want to use other values.
I tried to write subroutine in the above way, but eViews tell me that more arguments are needed. Is there a way to set up default value so as to reduce
number of arguments in some cases?
Thank you.
Can I set up default argument in subroutine?
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: Can I set up default argument in subroutine?
Unfortunately not.
As an aside, you might want to take a look at the Bollinger bands subroutine inside the TechAsis add-in.
As an aside, you might want to take a look at the Bollinger bands subroutine inside the TechAsis add-in.
Who is online
Users browsing this forum: No registered users and 2 guests
