Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning an Array from a Function
Message
De
29/02/2000 13:09:43
 
 
À
29/02/2000 13:04:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00338850
Message ID:
00339273
Vues:
22
>Correct me if I'm wrong, as I'm sure you will, but isn't :
>
>FUNCTION myFunction
>LPARAMETERS lcParam1, lcParam2
>LOCAL lcThisFunctionLocalVariable
>lcThisFunctionLocalVariable = lcParam1 + lcParam2
>Return lcThisFunctionLocalVariable
>
>passing a LOCAL up the chain.
>
>>You can't return an array from a function except as a member of an object; however, if you pass something by reference to a function or method, modifying the parameter within the function or method results in changing the referenced item. You also cannot use the @ within a return, and can't pass something created as LOCAL or PRIVATE up the chain; only PUBLICs can be seen above the level at whichthey are created.

You're passing back the value, not the variable itself; see my reply to Joseph Kempel for a more complete statement of exactly what I was trying to assert.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform