Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to make variable nothing after the performing functi
Message
From
14/07/2003 11:52:47
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
14/07/2003 11:41:51
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00809845
Message ID:
00809856
Views:
21
>how to make variable nothing after performing the function needed.
>
>In VB
>
>set lcdefault = nothing
>
>in VFP how to make a viariable nothing.
>
>Thank you.

In VFP, you assign a variable as follows:
MyVariable = "TextValue" && or number, or date, etc.
You can explicitly release a variable with the RELEASE command:
release MyVariable
I have never done this: private and local variables are automatically released after you end the program where they are defined.

You can also assign a null value, to indicate that no valid data is available, for instance:
...
if seek(SomeValue)
  ReturnValue = Field1
else
  ReturnValue = NULL
endif
...
HTH,

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform