This works EXACTLY as I want it to work, I'm not having any difficulties. However, whenever I've tried to find this on the forums and on google, I've found no discussions about it. In Free Pascal, it
seems like if you declare a variable between interface and implementation of unit A, then that variable is accessible to all units that import A. However, if you declare it after implementation but outside of procedures and functions, the variable is accessible within all procedures and functions, but is not accessible to units which import it. There are a huge amount of applications for this (at least in my opinion), but it doesn't even get a mention on
https://wiki.freepascal.org/Scopewhich surprises me. The reason for my post is, am I mistaken in some way, or is this an intended function of Free Pascal that is neglected in the documentation for the language? That is, is this concept of a global variable being private to a unit an actual feature of free pascal, or are there nasty behind the scenes consequences to me using it? Thanks!