Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reserved words....
Message
De
12/11/2004 08:44:32
 
 
À
12/11/2004 07:43:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00960601
Message ID:
00960782
Vues:
8
>>>>>Can anyone give me some examples where using a reserved word for a field name or variable causes problems?
>>>>
>>>>
>>>>m=5
>>>>CREATE CURSOR m (m i)
>>>>? m,m.m
>>>>SELECT 0
>>>>? m,m.m
>>>>USE
>>>>
>>>
>>>Fabio, aren't you missing the point? Victor is referring to reserved words, not to 'variables'.
>>>
>>>
sdsm=5
>>>CREATE CURSOR m (sdsm i)
>>>? sdsm,m.sdsm
>>>SELECT 0
>>>? sdsm,m.sdsm
>>>USE
>>
>>You are sure?
>>
>>m it is the shorter reserved word.
>
>Well, try my code and you'll see that it gives exactly the same results as your code...

And the name of the cursor ?
sdsm=5
CREATE CURSOR m (sdsm i)
? sdsm,m.sdsm && this m have to be the table name because table fields 
* it has precedence regarding the variable ones.

SELECT 0
? sdsm,m.sdsm && you cannot print m.sdsm field here
USE
Another simple example
m=CREATEOBJECT('textbox')
? m      && this not fire the error
? m.name && this fire a error
? m.m.name
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform