Hello,
I'm using Eviews 7
I've got two questions :
I'm wrinting a sub which will have two arguments : Subroutine mySub(Series mySeries, Sample mySmpl)
1) while inside the sub, how can I assign the value of mySmpl to a string : %myRange = ????
2) Instead of passing a Series to my sub, Is it possible to pass a transformation of a series, i.e. passing @pch(variable) instead of passing variable?
Thanks!
Danny
Subroutine 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: Subroutine arguments
1) is tricky. Something like:
To be honest, you're better off passing a string into the subroutine rather than a sample object. I personally never write subroutines that accept sample objects. Not worth the hassle.
2) Unfortunately not.
Code: Select all
subroutine foo(sample mysmpl)
%origsmpl = @pagesmpl 'store original sample
smpl mysmpl 'set the current sample to be the sample object
%myrange = @pagesmpl ' retrieve the string specification of the current sample
smpl {%origsmpl} 'restore the original sample.
endsub
2) Unfortunately not.
Re: Subroutine arguments
Gareth,
Thanks a lot for the quick response, and also for the advice. Very much appreciated.
Danny
Thanks a lot for the quick response, and also for the advice. Very much appreciated.
Danny
Who is online
Users browsing this forum: No registered users and 2 guests
