I made a stab at using the PROJECTGLOBAL keyword to see if it would work with sub declarations.
Got errors, so I assume it only works with variables; unless I missed something.
Would be nice if it handled declarations also.
Larry
The whole point of using PROJECTGLOBAL is that file is added to a project so when compiled the variables are defined global, and when $included in other files they are defined extern.
For subroutines you basically do the same thing. One include file with declare externs, and a source file(s) with GLOBAL SUBs .... If you wish you could use just a single include file, putting your declare extern(s) after the PROJECTGLOBAL "OFF" statement.
I understand what you tried to do, but an implementation like that would be a little messy. Include files shouldn't really contain code, and its hard to get the parser to ignore code and not generate anything.
The new designer I am working on handles these details for you. When you add a subroutine to a project it will let you declare it either local or global and puts the externs in the right place.
Paul.