Page 1 of 1

for loop syntax error

Posted: Thu Jan 04, 2018 6:15 am
by nupogodi
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

Re: for loop syntax error

Posted: Thu Jan 04, 2018 6:29 am
by EViews Gareth
No, it is not valid

Re: for loop syntax error

Posted: Thu Jan 04, 2018 6:40 am
by nupogodi
Apparently it's valid in any other programming language in the world. In case of Python for example:

for c in "":
print c

Re: for loop syntax error

Posted: Thu Jan 04, 2018 8:02 am
by EViews Gareth

Code: Select all

For %c “” Statusline {%c} Next