Problem for FOR TO LOOP

I dont under stand why I am getting this error:

image

with this simple code…

image

Hi @wizardontherun

I ran roughly the same code on my end and it doesn’t seem to have any problems.

print "Start Delay " + TIME$
a% = 0
For a% = 1 to 100000

next a%
print "End Delay " + TIME$

The device I was using was on FW 14.0 if that makes any difference

add a $ in front of the variable names.

$a% = 0
For $a% = 1 to 100000

next $a%

why some times you have to use the $ in front and other you do not?

Thank you again

Good question. Think it is for local variables but do not have a good reason for using it or not.

Maybe an HMS person can add the reason.

Hi @wizardontherun,

These sections of the programming reference manual might be the answer that you were looking for:

RG-006-0-EN-(Programming Reference Guide).pdf (865.6 KB)