for loop syntax error

For notifying us of what you believe are bugs or errors in EViews.
Please ensure your copy of EViews is up-to-date before posting.

Moderators: EViews Gareth, EViews Moderator

nupogodi
Posts: 53
Joined: Thu Jun 03, 2010 12:50 am

for loop syntax error

Postby nupogodi » Thu Jan 04, 2018 6:15 am

An empty list yields "Syntax error in control statement" but it's actually a valid statement

Code: Select all

%mylist = "A B C"    'this is ok
%mylist = " "       'this should also be valid

for %s {%mylist}
   %t = %s
next

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

Re: for loop syntax error

Postby EViews Gareth » Thu Jan 04, 2018 6:29 am

No, it is not valid
Follow us on Twitter @IHSEViews

nupogodi
Posts: 53
Joined: Thu Jun 03, 2010 12:50 am

Re: for loop syntax error

Postby nupogodi » Thu Jan 04, 2018 6:40 am

Apparently it's valid in any other programming language in the world. In case of Python for example:

for c in "":
print c

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

Re: for loop syntax error

Postby EViews Gareth » Thu Jan 04, 2018 8:02 am

Code: Select all

For %c “”
Statusline {%c}
Next
Follow us on Twitter @IHSEViews


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 19 guests