Page 1 of 1
For and quads
Posted: Sat Oct 29, 2011 5:10 am
by MachineCode
Just hit this limitation today:
Code: Select all
Line 12: 'For' doesn't support quad variables.
Any plans to support this in future? I need to do a For/Next loop where the ending value is a quad value, but the variable I'm using with "For" can't be a quad. Not sure how to get around it.

The code is: "For a.q=1 To n", where "n" = a quad value.
Re: For and quads
Posted: Sat Oct 29, 2011 5:30 am
by J. Baker
+1
Had the same issue with using a double. Looks like only an integer is supported at the moment.
Instead of a quad though, couldn't you just make "n" a negative value?
Re: For and quads
Posted: Sat Oct 29, 2011 5:39 am
by MachineCode
"n" is the result of FileSize() for an 8 GB file, so... no.

Re: For and quads
Posted: Sat Oct 29, 2011 5:45 am
by J. Baker
MachineCode wrote:"n" is the result of FileSize() for an 8 GB file, so... no.

yeah, my bad, as "n" would still not be any larger then an integer anyway. What was I thinking.

Can you use a loop like, Repeat until Eof?
Re: For and quads
Posted: Sat Oct 29, 2011 5:53 am
by Danilo
MachineCode wrote:Not sure how to get around it.

The code is: "For a.q=1 To n", where "n" = a quad value.
Code: Select all
a.q = 1
n.q = 10
While a <= n
;
Debug a
;
a+1
Wend
Or with a constant:
Code: Select all
a.q = $FFFFFFFFFFFA
#n = $FFFFFFFFFFFF
While a <= #n
;
Debug a
;
a+1
Wend
Re: For and quads
Posted: Sat Oct 29, 2011 10:27 am
by MachineCode
Looks like While/Wend will have to do. Thanks to both of you.