Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RETURN does arrays!
Message
De
20/10/2001 09:30:59
 
 
À
19/10/2001 17:35:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00570900
Message ID:
00571298
Vues:
23
Tamar,

In truth I must apologize for saying the example was confusing... I let my displeasure at not finding the 'feature' documented in VFP7's "RETURN Command" section get the better of me!
Once I calmed down and reread the whole thing it made perfect sense.

In my initial message I had checked the Help, loaded/run the example code to be sure it wasn't a 'removed feature' then quickly scanned the rest of the description in the book to formulate my message. When I came across the words "...You have to explicitly pass the array by reference, as in the example." I mistakenly took that as a requirement generally.

Thanks for your patience on this one.

Jim

>>I see. Was the example just done the way it is to confuse, or is there a purpose for doing so that I am missing? On reading more carefully I see that the in/out arrays are different, but why the "@" in both cases?
>
>Because it's required in both places. When you pass an array as parameter, you have to pass by reference or only the first element is passed. To return an array from a function or method, you put the "@" in front of it - that's the syntax.
>
>Sorry that the example was confusing. I was trying to show a real example of something you might do and returning both the row and column subscripts of an array element seemed like a good example.
>
>Tamar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform