Android Question Strange For loop problem

Arf

Well-Known Member
Licensed User
a strange error just suddenly started occurring.
It seemed to start happening after I switched from debug to signed key.

B4X:
For fvtref = 0 To 999
   'some code in here
Next
Error description: Regular variable followed by '=' expected.
Occurred on line: 73
For fvtref = 0 To 999
Word: .

any ideas?
 

Arf

Well-Known Member
Licensed User
B4X:
Dim fvtref =0 As Int
Eveything fine in legacy debug, but not when I use rapid debug - just discovered that. That for loop has been in there for a whole days worth of succesful compilations till now.

I've gone back to debug key, problem still there so seems only related to Rapid Debug
 

RandomCoder

Well-Known Member
Licensed User
You would not normally declare variables this way.
Try...
B4X:
Dim fvtref As Int

'or if needing to set initial value (not in process globals)

Dim fvtref As Int = 0
 

Arf

Well-Known Member
Licensed User
Troberg - No typos, it compiles fine in legacy debug, just not rapid debug.
I have attached a stripped down project.
Thanks guys.
 

Attachments

klaus

Expert
Licensed User
I get it too.
Erel should have a look at it.
As a workaround use a local variable in the for / Next loop and set the global variable to local one after the loop if you need it.
 
Top