Hi,
Here's a piece of code I'm running:
FOR i = THISFORMSET.nStart TO THISFORMSET.nEnd
FOR lnPosCommands = 1 TO ALEN(THISFORMSET.acCommands)
lcCommand = THISFORMSET.acCommands(lnPosCommands)
&lcCommand
ENDFOR
=MESSAGEBOX(VARTYPE(i))
ENDFOR
'acCommands' is an array property of the current FormSet.
Each one of it's entries is a line of text which represents a call to another function using 'i'. Here's an example of one of those calls:
save_FridgLabel(ALLTRIM(STR(i)), 20, 10)
As you can see, the commands were built to use the 'i' variable of my FOR loop. My problem is that after the macro executes, 'i' is no longer of Numeric type but is now a Character (as displayed by the messagebox). Why?
Nowhere in my macro am I setting 'i' (no i = ... and i is not passed as a parameter).
How can I avoid this transformation?
Thanks in advance, Stephane.