Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing optional array
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01670069
Message ID:
01670071
Vues:
78
Hi,
if pcount() < 3 && or whatever number
  LOCAL ARRAY aMyArray(1)
   aMyArray(1)=NULL
endif
MartinaJ

>Hi,
>
>I want to add an array parameter to a method. I know that I have to include, on the following line, the expression:
>
>External Array aMyArray
>
>
>Since it is optional, can I set the value of this parameter to NULL if nothing is passed? For example, to include the following code:
>
>if pcount() < 3 && or whatever number
>   aMyArray = NULL
>endif
>
>
>Or there is a preferred (better practice) method? The only other way I see is to set a variable within the method that would have the value True or False, depending if the parameter was passed.
>
>TIA
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform