Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question on ln in a for/next loop
#5
(09-12-2024, 07:01 PM)SMcNeill Wrote: Look for what you have ln defined as.   Check DIM and _DEFINE type statements.

The  "Unsupported variable used in the For statement" is usually one that triggers when you use an invalid variable type for the FOR..LOOP, such as a STRING variable..

Code: (Select All)
Dim ln As String
For ln = 1 To 50
    ' Print ln, SpeedFactor(ln), Speed(ln)
Next
I was thinking along this same line earlier but if this were the case then removing the arrays from the print statement and having it work means ln is a number in his case. This is a strange error he is receiving.
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Reply


Messages In This Thread
Question on ln in a for/next loop - by Dimster - 09-12-2024, 03:59 PM
RE: Question on ln in a for/next loop - by Petr - 09-12-2024, 05:25 PM
RE: Question on ln in a for/next loop - by LEM - 09-12-2024, 05:44 PM
RE: Question on ln in a for/next loop - by TerryRitchie - 09-12-2024, 07:09 PM
RE: Question on ln in a for/next loop - by bplus - 09-13-2024, 12:45 AM
RE: Question on ln in a for/next loop - by bplus - 09-13-2024, 04:43 PM
RE: Question on ln in a for/next loop - by Pete - 09-13-2024, 06:23 PM
RE: Question on ln in a for/next loop - by bplus - 09-13-2024, 10:26 PM



Users browsing this thread: 11 Guest(s)