Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro changes variable type
Message
From
07/02/2002 15:01:56
 
 
To
07/02/2002 12:37:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00616675
Message ID:
00616933
Views:
23
>You don't need macro substitution:
>
>
>FOR i = THISFORMSET.nStart TO THISFORMSET.nEnd
>	FOR lnPosCommands = 1 TO ALEN(THISFORMSET.acCommands)
>*		lcCommand = THISFORMSET.acCommands(lnPosCommands)
>*		&lcCommand
>		EVALUATE(THISFORMSET.acCommands(lnPosCommands))
>	ENDFOR
>	=MESSAGEBOX(VARTYPE(i)) &&<= displays 'C'
>	*i = Val(i)
>ENDFOR
>
>
>Check THISFORMSET.acCommands[], may have "i = ALLTRIM(STR(i))"
>
>Is i being passed by reference to any of the functions?

i is never passed by reference (no @) and all the commands in acCommands are basically the same function call with different parameters (only the last two change):
save_FridgLabel(ALLTRIM(STR(i)), 20, 10)
save_FridgLabel(ALLTRIM(STR(i)), 20, 5)
save_FridgLabel(ALLTRIM(STR(i)), 10, 10)
etc.

The function save_FridgLabel is in a DLL and is defined as follows:
extern "C" __declspec(dllexport) LONG save_FridgLabel(LPSTR, LONG, LONG);
Is it because of the DLL function (even though the LPSTR seems appropriate)?

Stephane.


P.S. The first parameter of the function is never used a left operand in the C function.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform