global variables lazarus / 8-Other ---------------------------------------------------------------------- ferreirah · 2007-11-29 21:51 Hi I haven't worked with Pascal for donkeys years and I wondered how do you create a global variable in Lazarus? What's the syntax? Can you put all your global variables in one unit and use that unit thorughout your program? What do you do if unit a uses unit b and b uses a again - a circular referance? How does the compiler handle it? Thanks Heine ---------------------------------------------------------------------- antonio · 2007-11-29 22:12 You can avoid circular references by putting your uses clause on implementation part of the unit. You can create global variables by putting their declaration before the implementation part of the unit. Code: [Select] var   GlobalInteger :Integer; implementation uses NoCircularRefetenceUnit;