WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Error Codes

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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
File Created: 2001:11:08:12:40:18
Last Updated: 2001:11:08:12:40:18