Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing Referenced Variables
Message
 
À
08/04/2008 08:48:50
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01308965
Message ID:
01309083
Vues:
9
An alternative could be:
loName = split_name(Schedule.s_Pat_Name)

NewFirstName = loName.FirstName
NewMidName = loName.MiddleName
NewLastName = loName.LastName


FUNCTION split_name

	LPARAMETERS tcName

	(Other stuff going on here)

	loSplitName = CreateObject('Empty')
	addproperty(loSplitName, 'FirstName', SomeNewValueForFirstName)
	addproperty(loSplitName, 'MiddleName', SomeNewValueForMiddleName)
	addproperty(loSplitName, 'LastName', SomeNewValueForLastName)

	RETURN loSplitName
>The values of these variable are populated in the Split_Name function, but they still are empty after the function runs. I must be not using the reference correctly.
>
>
>NewFirstName = ''
>NewMidName = ''
>NewLastName = ''
>
>cLastFirst = split_name(Schedule.s_Pat_Name, @NewFirstName, @NewMidName, @NewLastName)
>
>
>
>FUNCTION split_name
>
>	LPARAMETERS tcName , taNewFirstName, taNewMidName, taNewLastName
>
>	(Other stuff going on here)
>
>	NewFirstName = SomeNewValue
>	NewMidName = SomeNewValue
>	NewLastName = SomeNewValue
>
>	RETURN
>
>
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform