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

Possibly Related Threads…
Thread Author Replies Views Last Post
  _Putimage Question. Pete 11 692 01-04-2026, 09:33 PM
Last Post: Pete
  Nice simple, I hope, question Mad Axeman 4 346 12-20-2025, 09:28 PM
Last Post: SMcNeill
  Exiting sub while inside a loop PhilOfPerth 5 520 12-05-2025, 09:40 AM
Last Post: PhilOfPerth
  NewBie Question niteflyer 2 339 11-06-2025, 07:11 PM
Last Post: Petr
  A Question About _MAPTRIANGLE Magdha 2 384 11-02-2025, 11:37 AM
Last Post: Magdha

Forum Jump:


Users browsing this thread: 2 Guest(s)