Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detect state of memofield and textbox
Message
From
16/11/2012 04:39:03
 
 
To
16/11/2012 04:34:21
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01557010
Message ID:
01557413
Views:
46
>>>>>>>Karen,
>>>>>>>
>>>>>>>clearly there is some misunderstanding here. The thing is that m is a reserved word, since you can use it to tell that what comes after it plus a dot is variable, even though a field may have the same name. Like if you have opened a table with a field called XX with a value of 5, and a variable called XX with a value of 10. Now you see the following:
>>>>>>>?5*XX && 25 since a field has precedence
>>>>>>>?5*m.XX && 50 since m. tells VFP to use the variable XX.
>>>>>>>Also note that m alone is not allowed as a variable name, and it's also not allowed as an alias. And a field named m would most likely be asking for real trouble,
>>>>>>>
>>>>>>
>>>>>>>Also note that m alone is not allowed as a variable name
>>>>>>> And a field named m would most likely be asking for real trouble,
>>>>>>
>>>>>>
>>>>>>Says who ?
>>>>>
>>>>>Check Reserved Words in Help.
>>>>
>>>>
>>>>There are (hardly) reserved words in foxpro, ie foxpro does not enforce them
>>>>
>>>>(reserved) words become significant, ahem reserved, in the context
>>>>
>>>>
>>>>local if
>>>>if = 2
>>>>if if == 2
>>>>	? 'if = 2'
>>>>endif
>>>>
>>>
>>>If you want to live on the edge, try this, and play with the values.
>>>Create Cursor _screen (height i, width i, left i, visible l)
>>>Insert Into _screen (height, width, visible) Values (500,500,0,.t.)
>>>Browse
>>
>>
>>This does not prove in any way that the following claim is right
>>>>>>>Also note that m alone is not allowed as a variable name
>
>OK, I confess that I didn't check this, and I may be wrong. Just like I haven't tested using any of the other about 1000 reserved words as variable names. Microsoft has written the following warning, which I try to follow: When programming, avoid using reserved words as names for window, table, or field names. If you use a reserved word as a name, it might generate a syntax error.


I always test before posting

As to 'reserved' words. Foxpro does not have 'reserved' words, if it had the following would not be possible
if = 2
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform