Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Detect a Memory Variable's existence
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01243828
Message ID:
01243845
Vues:
24
>>>>How do you detect if a memory variable exists without causing a program to stop?
>>>
>>>Use vartype(myVar)<>'U'
>>>
>>>Or use type('MyVar') <> 'U' for more complex cases.
>>
>>type('MyVar') <> 'U' wouldn't work if you have a field with the same name :-)
>
>Good point, though I updated my reply a bit while you were replying. But you didn't give me time to correct a typo in the word existence :)
>
>Anyway, the best way to check would be
>
>type('m.MyVar') <> 'U'
>
>or vartype(m.MyVar) <> 'U'
>
>to make sure we're talking about variables and not field names.

HE! That is how we vultures work :-)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform