Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scope in VFP
Message
De
31/07/2006 06:20:58
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
29/07/2006 23:22:36
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:
01141753
Vues:
14
>Hi Cetin:
>
>Just wondering if your class example is similar to the kilofox example that i've added to my program for returning multiple values from a function using names parameters. It goes like this:
>
>called program:
>
>
>FUNCTION hg_variables ()
>LOCAL oParam
>**do some calculations and store values to rg1, rgc1, rg2, rgc2
>oParam = CREATEOBJECT("line")
>WITH oParam
>
>	.addproperty("Right1", rg1)
>	.addproperty("Right1cv", rgc1)
>	.addproperty("Right2", rg2)
>	.addproperty("Right2cv", rgc2)
>
>endwith
>RETURN oParam
>
>
>
>calling program:
>
>
>local oRetval, rg1, rg2, rgc1, rgc2
>oRetval = hg_variables()
>rg1 = oRetval.right1
>rgc1 = oRetval.right1cv
>rg2 = oRetval.right2
>rgc2 = oRetval.right2cv
>
>
>then when i need to use the variables (rg1, rgc1, rg2, rgc2), i just pass them as a parameter in a function.
>
>Is this similar to what you're describing? Is this cleaner (albeit more work) than using public variables? if so, i guess public variables is more lazy programming. :-)
>
>thanks,
>
>Paul

Paul,
I don't know kilofox but the technique you outlined is one of those that I use passing and/or retrieving multiple parameters at once (in the past I was calling it parameter cargo but I think it wasn't understood what I mean in English:)
Public variables are not more lazy programming, they're more 'hard work' programming IMHO:)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform