Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Procedure parameter name with cursor field name
Message
De
23/02/2004 21:12:39
 
 
À
23/02/2004 20:08:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00880134
Message ID:
00880145
Vues:
18
This message has been marked as the solution to the initial question of the thread.
Marc,

If you prefix your MEMVAR name with "m.", as in m.nperid, all should be fine.

When there is a collision between a memvar name and a field name (in the selected table) then VFP will ALWAYS default to the FIELD. You avoid such a collision by coding "m." for the memvar, making it clear that it is the memvar that is wanted.

good luck

>dear all,
>
>i just wondering whether when declaring a parameter name for a procedure should not use any of the opened table / cursor field?
>
>since using the code below it pop up a '0' value for the messagebox. but if i change the name to something else it will show '10' as expected.
>
>CREATE CURSOR example (;
> nperid i ;
>)
>SELECT example
>? lookingdata(10)
>
>
>PROCEDURE lookingdata(nperid AS INTEGER)
> LOCAL x
> MESSAGEBOX(nperid)
> x = ALLTRIM(STR(nperid))
> x = PADL(x,6,"0")
> RETURN x
>ENDPROC
>
>regards,
>Mark
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform