Global variables got a bad name back in the very early days of programming because they quickly became unmanageable as an application grew. The real problem was when various parts of the application was allowed to change the variable, you very quickly found yourself wondering "who did that?".
The use of globals does make sense for some use cases, particular settings. I have a 'settings' unit that reads the settings in from a file, and makes those values available to other units as needed. In most cases, thats read only.
But the user can sometimes change settings and at times like that, the unit where the changes are made must have a way of telling the settings unit about that change. In most cases, when that happens, the settings file needs to be updated as well as the relevant global var. Its a classic case for properties. The write to property can do some sanity checking and trigger actions like saving.
So, nothing evil about global vars, just limit their use and regard them as read only (and maybe enforce that with properties) where ever possible. You can easily search through all your units to find just which units are writing to a global, as a linux user, its the grep command and used often !
grep -ni "blah :=" *.pas
Davo
In