Page 1 of 1

String arguments to @cumsum

Posted: Fri Sep 06, 2013 5:45 am
by Dave_the_Forecaster
Hi,

I have a programming niggle that I'm hoping someone on here can help with.

I have several dates saved as strings:

Code: Select all

%snap1="2013Q4" %snap2="2014Q4" 'etc etc
I need to use the function @cumsum within a loop, using various combinations of the above dates as the sample restriction for @cumsum.

The problem I'm having is that @cumsum requires the sample to be entered as a single string inside double quotes. I know that I can get around the problem by first defining a separate string for each sample range I need:

Code: Select all

%smpl1=%snap1 + " " + %snap2 'etc
but, due to the number of different samples I need, this is not a very elegant solution to my problem.

Any ideas??

Re: String arguments to @cumsum

Posted: Fri Sep 06, 2013 6:55 am
by EViews Gareth
The way you're doing it is probably best.