Re: Forward reference bug: was ver. 4.0 WIN98 Binaries
- Posted by mattlewis (admin) Sep 13, 2008
- 1589 views
Why would a variable have anything to do with a forward reference? I thought forward references are for routines, not variables.
Matt added the ability to forward reference variables and constants and enums and etc. This makes a lot of sense, since when dealing with the issue of recursive include files often more than just routines are shared between the libraries.
Yes, the real reason for this is for when two files are interdependent and include each other. Previously, working code was extremely dependent upon which file was included first. Now, it doesn't matter. If you put an include in your file, you don't have to worry about that sort of thing, and you can just use the file, even if it uses you back. It really only allows you to forward reference variables, constants and enums in other files.
Also, it's actually convenient for finding typos in code. Instead of the parser immediately throwing a compile time error, it waits until the end, and you get the entire list of errors that it found. I've found this much more convenient (and easier on my blood pressure) than run, crash, fix....run crash fix....etc...
Matt