ZDEF and ZLOC

These two features were introduced into the editor of VFP 8. One gives you a list of the constants that have been defined, the other gives a list of local variables. Both work in an unusual way.

ZDEF

If you type zdef into the VFP editor then it at first appears as though you are heading for a syntax error

[ZDEF before the constants appear]

but as soon as you add a space, a list of the currently-defined constants appears:

[ZDEF after the list of constants have appeared]

Better still, the list also shows the current value of the constants.

ZLOC

This works in a very similar way. Type zloc followed by a space into the VFP editor and you'll see a list of local variables.

How is it done?

The strange behaviour of these two features is explained by the fact that both are Intellisense scripts. If you open the FoxCode table then you'll find both these scripts towards the bottom of the table.

Note that there's a warning in the FoxCode table that the AllowCustomDefScripts property must be set .T. in the IntelliSense Manager.

Related Items

HTML from FoxPro

FoxPro commands and functions for generating HTML documents.

Read More

VBA Code for Events in Access

Open the Access VBA code editor automatically as the default for methods.

Read More