Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Flush COMMAND
Message
De
13/01/2011 19:44:03
 
 
À
13/01/2011 13:59:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01496061
Message ID:
01496102
Vues:
95
>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).
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform