Hello,
I would like to have a for loop where my control variable is used in the name of strings that I define. The documentation mentions how to do this when naming series, but not when defining names for strings.
I have tried the following, but get errors:
for !i = 1 to 3
%stringname_!i = @right(mygroup.@seriesname(!i+1),6)
alpha string_!i = @insert(%stringname_!i,"xyz",2)
next
Thanks in advance,
-cap
use control variable when naming a string variable
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13318
- Joined: Tue Sep 16, 2008 5:38 pm
Re: use control variable when naming a string variable
I don't think that is currently possible. You cannot dynamically assign the name of a program variable.
You could try storing the strings as cells in a table rather than in string variables though.
You could try storing the strings as cells in a table rather than in string variables though.
Code: Select all
table a
for !i=1 to 3
a(1,!i) = @right(mygroup.@seriesname(!i+1),6)
%stringname = a(1,!i)
alpha string_!i = @insert(%stringname,"xyz",2)
Follow us on Twitter @IHSEViews
Who is online
Users browsing this forum: No registered users and 57 guests