tells me that anything that "runs" should be inside of a procedure. This is as intended. I read things that are compile time such as compiler directives and variable and constant declarations are OK. Procedure calls are not.The DLL code is like a PureBasic code except than no real code should be written outside of procedure.
On Mac OS X, this is a particular problem, while Linux and Windows let you get away with it. This week after a Bus Error head banging session i learned, that
Code: Select all
Global lastIdx = 4
Global Dim someArray.s(lastIdx)
Code: Select all
someArray.s(0) = "foo"
Maybe it would be useful to elaborate a bit on which things are allowed, and which not. By allowed we should focus on the strictest platform, i guess Mac. I above example should definitely be part of that.
I would also be worth mentioning that Mac OS X is really strict on this, and that it'll rain Bus Errors and Segfaults if this rule is violated, and that other platforms are a bit more permissive.