Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Flush COMMAND
Message
From
13/01/2011 19:44:03
 
 
To
13/01/2011 13:59:24
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01496061
Message ID:
01496102
Views:
94
>It looks like an illegal command to me.
>OXCA is the same as 202, _ERR is probably an error number. So !_ERR=0XCA is a comparison reporting either .T. or .F. This means that the whole expression FLUSH !_ERR=0XCA will translate into FLUSH .T. or FLUSH .F., but both of these commands are illegal.
>
>>In an inherited application I found the following FLUSH command.
>>
>>FLUSH !_ERR=0XCA
>>
>>Anyone know what the !_ERR=0XCA is?
>>
>>
>>Harry

Could it possibly be that code depends on a holdover from FoxPro days where sometimes you can have an implicit && comment (which I recall often occurring with IF statements) ? Basically something like:
IF 1=1 AMD 2=1
    ? "Yuck!"
ENDIF
rather than getting a syntax error, the mispelling of "AND" would cause an implicit && comment, so that the code would execute as:
IF 1=1 && AMD 2=1
    ? "Yuck!"
ENDIF
In VFP 6.0 the FLUSH command lacks the additional clauses available in VFP 9.0 (don't have 7.0 nor 8.0 so I don't know in which version the additional clauses for FLUSH command were added) -- so the particular example of the FLUSH command will not generate error (i.e. the "!_ERR=0XCA" is completely ignored).
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform