Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pass NULL instead of array
Message
 
 
To
23/02/2019 14:48:24
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01666677
Message ID:
01666681
Views:
33
>>Hi,
>>
>>I have a function that receives a parameter, an array. The code is as follows:
>>
>>
>>Function MyFunc
>>LPARAMETERS tParam1, tParam2, taMyArray
>>EXTERNAL ARRAY taMyArray
>>
>>
>>I need to add the 4th parameter. In the case of the 4th parameter the 3rd is not necessary. If I pass the 3rd parameter (taMyArray) set to NULL will I have a problem? Since the next line (EXTERNAL ARRAY taMyArray) expects this parameter to be an array.
>
>You could as well pass something else as 3rd parameter and then instead of checking whether it's null, check whether it's an array or not.

Thank you. I thought about it too. But since I am not sure if whatever approach I would use to check for array will work, I decided to use NULL. Isnull() is so easy and reliable.
"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
Previous
Reply
Map
View

Click here to load this message in the networking platform