Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scope in VFP
Message
De
30/07/2006 13:35:17
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
30/07/2006 12:01:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
SAMBA Server
Database:
Visual FoxPro
Divers
Thread ID:
01141152
Message ID:
01141637
Vues:
16
>thanks mike. a couple of questions.
>
>don't think you finished your first line there. let me know what you meant on that line. thanks.

No prob. I was going to say using a parameter object you can handled more than 27 parameters. I put it in another line.

>
>2nd, you stated:
>"When you want to use the individual values, you pass the entire object, not the individual values."
>i didn't think of that. so:
>
>1. you add properties to an object and store values to them so you can return the values to the calling function.

You can do that if you need multiple return values. I usually return from the function/procedure a success/fail. I'm suggesting you always send parameter objects to functions.

>2. if you need to use these values again in another function (say "myfunction") you pass that object such as: myfunction(objectname)

Yes

>3. within myfunction, you reference the variables as "objectname.property".

Yes
>
>What I had been doing was creating another variable to store "objectname.property" and then pass that to myfunction. If that's not what you would do, maybe that's what's causing me to work a bit harder here.

I would only send the object, and not another variable. They both point to the same actual object, so it's a little redundant.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform