Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
*Compatibility Report 5-7* SYS(2018) content different
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
*Compatibility Report 5-7* SYS(2018) content different
Divers
Thread ID:
00697397
Message ID:
00697397
Vues:
74
Description :

In VFP5/6 a TYPE('NonExistingVar') would cause SYS(2018) to obtain the value 'NonExistingVar' when the variable NonExistingVar doesn't exist.
This could be used in order to "reset" the contents of SYS(2018) due to later retrieval of changes to it.

In VFP7 this won't affect SYS(2018) anymore.

This is or the solvation of a bug, or the introduction of a bug. Hence, the TYPE of a non-existing variable would trigger an internal error routine of VFP (FPDos as well), causing SYS(2018) to be filled as usual when an error occurs.

Workaround :

For now, the only possibility seems to be to store the actual contents of SYS(2018) preceeding any process that lateron checks for it to be changed.
Obviously, this is not foolproof at all, when two subsequent errors are the same.

Further notes :

SYS(2018) gets filled with strange, but recognizeable data from the app;
It looks like an IF can do it, but NOT with the argument (some variable) of the IF. In the before versions this happened too, but then it was consistent.
Now, it looks like parts of an object's reference move into SYS(2018). Examples : "VISIBLE" or "cmdAdd" as part of a just occurred AddObject.

Before, SYS(2018) could perfectly be used for nesting error traps (though complex), which now isn't available as a "decent feature" anymore.

Question :

Would anybody know the command or sequence of commands that let store a predefined value in SYS(2018) ?
Please note that activating a dummy ON ERROR A=1 (etc.) would do it on e.g. A=B and B doesn't exist (SYS(2018) would contain 'B' now). However, when an Error is already in effect, the trap obviously won't happen. Same with the ERROR command.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform