Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing file variables to a function
Message
De
15/04/1999 13:39:43
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Passing file variables to a function
Divers
Thread ID:
00208655
Message ID:
00208655
Vues:
65
Is it possible to pass a file variable to a function?

I am wanted to write a function that would allow the user of my class to specify the name of the fields in a table they want to modify. The function looks something like this:

PROCEDURE setDatabaseFieldnames
LPARAMETERS lcRecordID, lcFirstName, lcLastName, ... lnErrorCodes

THIS.record_field_name = lcRecordID
THIS.firstname_field_name = lcFirstName
. . .
THIS.errorcodes_field_name = lnErrorCodes
ENDPROC

When I then attempt to access the member variable record_field_name for the name of the record field in say a SCATTER command (i.e. SCATTER THIS.record_field_name ... TO laFieldInfo) I get an error like the following "RECORD_FIELD_NAME is not a file variable".

Any suggestions would be helpful.

Thanks,

Henry
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform