global scope. Often this means that its life time coincides with the program run time.
"Existence/Lifetime" Scope: yes
"Visibility Scope": no
Sounds confusing?
Well existence means that there is a fixed place in memory where the variable exists.
It is there from the start to the end of your apps runtime.
Visibility means that accessing that memory via the "identifier" (i.e. "var Foo: integer;" => ident = Foo) is not always possible.
The name may be out of scope. The value exists.
Had you taken the address of the value, you could do "PInteger(Addr)^"
However I conclude that a globally scoped variable cannot be declared in the program module.
That comes down to how you read "must be declared before being used"
True your app logically starts at the start of the "program" module.
But for the compiler each unit is a container of its own, where scope starts all over again.
The compiler can (pre-) compile any unit, and later use it in your program.
If your unit (or program) does "uses XYZ" then it imports XYZ, and things declared in (the interface section of) XYZ will come into scope.
The other way round, if your unit is *used* by another unit (or by the program) , it knows nothing about the "entity that uses it".
-----------
anyway as I said
unit MyGlobalVars;
interface
var Global1: integer;
implementation
end.
and in any other unit and in your program do "uses MyGlobalVars" => and you got your global