Help in creating a list with integers values for the loop to work

For questions regarding programming in the EViews programming language.

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

sudesh
Posts: 51
Joined: Fri Nov 03, 2017 7:30 pm

Help in creating a list with integers values for the loop to work

Postby sudesh » Tue Feb 13, 2018 9:34 am

Hi,

I would like to do a loop in with the level changes. The level are integers values ( 1.75, 2 and 2.5)

I would like to create a list with integers values for the loop to work.

Sample of my code:

string list = "1.75 2 2.5 "

for %u {%list}

!full_exp = 1

if zsc_{%u} > {%u} then signal_{%u} = -!full_exp
else if 0
end if

next

Any help will be greatly appreciated.

Thanks.

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

Re: Help in creating a list with integers values for the loop to work

Postby EViews Gareth » Tue Feb 13, 2018 9:43 am

Looks like the for loop part of your code will work just fine.

I'll point out that 17.5 is not an integer by the way.
Follow us on Twitter @IHSEViews


Return to “Programming”

Who is online

Users browsing this forum: Google [Bot] and 21 guests