Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to make variable nothing after the performing functi
Message
De
14/07/2003 11:52:47
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
14/07/2003 11:41:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00809845
Message ID:
00809856
Vues:
19
>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)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform