Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

What does it means "must not cross a line boundary"?

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

Tags (1)
1 Solution

Accepted Solutions

Re: What does it means "must not cross a line boundary"?

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

3 Replies

Re: What does it means "must not cross a line boundary"?

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

Not applicable

Re: What does it means "must not cross a line boundary"?

Thanks Colin for the clear example. 

Rdgs,

Chun Wey

Not applicable

Re: What does it means "must not cross a line boundary"?

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.

Community Browser