Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Macro changes variable type
Message
De
07/02/2002 15:01:56
 
 
À
07/02/2002 12:37:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00616675
Message ID:
00616933
Vues:
24
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform