Discussion Board for collaboration related to QlikView App Development.
Hi All,
I am reading about the reference manual and came across this statement:
Since the for..next statement is a control statement and as such is ended with either a semicolon or end-ofline,
each of its three possible clauses (for..to..step, exit for and next) must not cross a line boundary.
What does it mean? Can anyone explain or provide a simple example ?
I tried to search online but to no valid.
Thanks
Chun Wey
You must type the "for..to..step" expression on one line of your script. You cannot put a line break between for, to or step.
For I = 1 to 10 step 2 is OK
For I = 1 to 10
Step 2. Will error
You must type the "for..to..step" expression on one line of your script. You cannot put a line break between for, to or step.
For I = 1 to 10 step 2 is OK
For I = 1 to 10
Step 2. Will error
Thanks Colin for the clear example.
Rdgs,
Chun Wey
Another example to show what this mean:
Set vLot =1;
1. ERROR:
if vLot =1 then vLot= vLot +1 end if;
2. OK:
if vLot =1 then; vLot= vLot +1; end if;
3. OK too:
if vLot =1 then
vLot= vLot +1
end if;
This illustration can be found in QLikview reference manual SR 9 page 246 on if then elseif else end if control statement.