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.

MS Access technical tips

Visual FoxPro technical tips

General Tips

 

More tips from Alvechurch Data

Alvechurch Data - Microsoft FoxPro and Access Database Development and Training

Alvechurch Data are based close to Birmingham and provide Microsoft Access and Visual FoxPro training, development and support.

Read More

Autocomplete in Visual Fox Pro

Autocomplete in Visual Fox Pro

The textbox class in Visual FoxPro 9 has a new Autocomplete property which shows the user the previous values that have been entered in that textbox.

Read More

Access and Visual FoxPro Training

Microsoft Access and Visual FoxPro training courses and workshops offered by Alvechurch Data in Birmingham.

Read More

Geoff Franklin CV

Geoff Franklin - resume of education and experience in Access and Visual FoxPro programming.

Read More

Visual FoxPro tips for database developers

Visual FoxPro help and advice for database developers

Read More