Create Multiple Series

For questions regarding programming in the EViews programming language.

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

Redwing153
Posts: 30
Joined: Sat May 30, 2015 5:10 am

Create Multiple Series

Postby Redwing153 » Thu Aug 13, 2015 3:15 am

Hello,

I have a string object sername which contains numerous series names.
e.g.
UKX
ASX
MCX

I would like to write a program which uses the sername object and loops through the series names to create new series
e.g.
UKX_new
ASX_new
MCX_new

etc.

I know it's a simple question but I am completely failing to loop through my string object.
Can some-one help please?

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

Re: Create Multiple Series

Postby EViews Gareth » Thu Aug 13, 2015 7:50 am

How is the string object delimited?

Redwing153
Posts: 30
Joined: Sat May 30, 2015 5:10 am

Re: Create Multiple Series

Postby Redwing153 » Thu Aug 13, 2015 9:15 am

With spaces.
I think this works, actually:

Code: Select all

for %i {stringobj} series {%i}_new next

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

Re: Create Multiple Series

Postby EViews Gareth » Thu Aug 13, 2015 9:31 am

Yep.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests