Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


3074: Expression continues past expected end

Keywords: 	 for loop 3074 error  Expression continues past expected end

Question:

Receive an error 3074 when I include white space in an arithmetic expression in a for statement:
3074: Expression continues past expected end.
On line:
+1 to count; Shift parameter sequence to eliminate evaluated parameter."
The following example produces no error:
i = 1
count = 9
for ii = i+1 to count 
next ;ii
This example with white space in expression produces error #3074 on second iteration of loop:
i = 1
count = 9
for ii = i + 1 to count 
next ;ii
I discovered this because it is my habit to include a lot of spaces. I have not previously encountered difficulty with the WinBatch interpreter (WinBatch 99 & 2000) parsing my extra spaces. Is there a rule I need to know or should I give up extra spaces in expressions?

Answer:

Yes. The FOR statement is kind of dumb. It does not like expressions with spaces in it. It gets confused.
Article ID:   W14844