String in String

For questions regarding programming in the EViews programming language.

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

stefanp
Posts: 63
Joined: Wed Sep 30, 2015 12:24 am

String in String

Postby stefanp » Fri Jul 15, 2016 7:08 am

Hey,

I was wondering if it is possible to use a string do define another string. I thought of something like this:

Code: Select all

string a="1 2" string b="3 4" string c="{%a}"+"{%b}"
However, it obviously does not work.

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

Re: String in String

Postby EViews Gareth » Fri Jul 15, 2016 7:15 am

Remove the braces

stefanp
Posts: 63
Joined: Wed Sep 30, 2015 12:24 am

Re: String in String

Postby stefanp » Mon Jul 18, 2016 12:59 am

As far as I see it, the resulting string is

%a%b

Whereas I need
"1 2 3 4"

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

Re: String in String

Postby EViews Gareth » Mon Jul 18, 2016 8:13 am

Code: Select all

string c = %a + %b


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests