Tuesday, December 28, 2010

PEM Editor tip: CreateLocalsStatements.PRG and orphaned Locals

This is a new feature in version 6.50.

There is a updated version of Plug-In 'CreateLocalsStatements.prg' in the 'Sample Plug-Ins' folder.  This Plug-In allows you to format your own Locals list in the way that you like.  (Apparently, there is great variety in this in the community, and some are very attached to the way they like their LOCALs formatted; I find this interesting, since once the list is created, I never want to see it again.)

This new version is an exact duplicate of what is done internally by PEM Editor, including references to the current preferences settings.  This allows you to tinker with the existing code to meet your own needs.

There are some new columns in the array which is passed in.  In particular, if Column 6 is True and Column 8 is False, then that row in the array refers to an 'orphaned' Local -- it appears in the list of locals, but is never assigned a value.  You could choose to have special formatting for such orphans (e.g., listing them separately, or even ignoring them altogether.)

No comments:

Post a Comment