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:
01670074
Vues:
57
Thank you, Martina.

>Hi,
>
>EXTERNAL ARRAY coomand is information for compiler/project build
>
>MartinaJ
>
>>First, thank you, Martina.
>>Do I understand correctly that there is no conflict that the array name is the same (in External Array and Local Array)?
>>
>>>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
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform