Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing parameter by reference
Message
De
10/10/1998 09:41:00
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00144309
Message ID:
00145655
Vues:
45
>>Anyway, if "do the_prg with param1, param2" is equal to the function call of "=The_prg(param1, param2)", what is equal to "do the_prg in prg_file with param1, param2"?

>I've only used the IN maybe once or twice in the last few years. I don't think there is an equivalent in function call notation, other than SET PROC.
>
>Also must remember that DO func passes references, what func() passes depends on the setting of UDFPARMS but the FoxPro library code like GENXTAB in FPW2.x can fail horribly and it's pretty hard to detect why it failed when UDFPARMS is changed from the default setting.

That's another thing I've never done - Set UDFParms to anything. It's welded to its default for ever, AFAI'm concerned. The sole reason for existence of this command seems to be some compatibility (with what?) and it's an open hole to fall into, if you ever touch it. I didn't even think of trying.

I also can't think of having more than five or six functions which return modified parameters, except arrays - but they are passed by reference just because they can't be passed otherwise. I think I have only two of parameter-modifying ones. They are so hard to document (can't have neon shining characters in source to warn you), and once you forget which ones modify their parameters, you're seen for a long debugging session. Simply not healthy, IMO.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform