> When you first start up Pop11 and compile a program, the compiler produces a
> list of the global variables it is declaring for you.
^^^^
I wonder if this is what you mean: in addition to printing out the
warning messages, the default setup also stores the words (not the
identifiers) in the list called "popwarnings" unless you do
false -> popwarnings;
(See the REF * popwarnings entry, in REF * MISHAPS)
If you want to know which file and line number are involved do
newprwarning -> prwarning
See LIB * NEWPRWARNING
Because the list popwarnings is available, that means that at any time
you can if you wish cancel all those auto-declared identifiers
applist(popwarnings, syscancel);
then, to start a fresh list do
[] -> popwarnings;
(This won't work if you have any automatically declared variables in
sections. You could redefine the prwarning procedure to keep track of
current_section, and then use section_cancel to get rid of whole
sections containing auto-declared variables.)
> Now if you recompile the program, as the variables have already been declared,
> you don't get the warning messages again.
Unless you have cancelled the identifiers as above.
> Is there a way to remove the existing global variable declarations without
> quitting Pop11?.
The above gets rid of the global variables that were automatically
declared, but not ones that you declared nor ones that were autoloaded
successfully. And that probably does exactly what you want.
> I will be able then to track exactly what is getting declared during each
> compile cycle without having to restart Pop11.
There should be a sys_restart() function that clears out everything
since the system was started up. The nearest approximation is
sysrestore. I.e. compile things you know you are going to need without
recompilation, then create a saved image using syssave, e.g.
;;; save all VED files, then quit them then do
syssave('checkpoint.psv') =>
then to get back to the same point do
ved_w(); ;;; NB write all files first.
sysrestore('checkpoint.psv') =>
BUT if you are using X this may screw up any open X windows, etc. I
don't know.
Aaron
|