Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I need 'Wile E. Coyote, Super Genius'...
Message
 
À
21/01/2001 13:38:23
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00466285
Message ID:
00466377
Vues:
8
Hi Dragan

Good point, but in this special case it will not work. The reason is that the two functions called here must have the same name and the Fox always starts it's search for a function (or procedure) in the program file he is actually in.

The procedure lib you set with the SET PROC command is only the Fox's second choice. Thus using your idea you will end up here in a recursive loop stopping after 128 iterations with the "DO Level nesting exeeds ..." error.

Regards
Markus

PS.
Addon for the Foxgang: An IN clause for functions would be nice to have in VFP7 too ;)

>
>A little addendum here. While you can call a routine this way, you can't call a function, i.e. there's no way to have
>
>lResult=funcname() in blabla.prg
>
>One way would be to keep your functions (still keeping names as you like) in one .prg file and then in your cuckoo's egg program give a
>
>
set procedure to blabla.prg
>lResult=funcname()
>
>Or alternatively you can Set Procedure to OriginalButRenamed.spx or something like that, depending on what you need in each particular situation. One thing to keep in mind is that you don't know if the called program needs some particular procedure file to be open while it runs, so you may need to save the set('procedure') to a variable, then set it to your file plus the old set, then on exit reset it to what it originally was. Placing your file to the beginning of the list should make Fox to find functions in it before finding them in any other file in the list.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform