Forward declaring Types

BlitzMax Forums/BlitzMax Beginners Area/Forward declaring Types

Brendane(Posted 2005) [#1]
Hi,

Is it possible to forward declare a Type?

ie. if I have two types which in separate source files, each which reference each other.


FlameDuck(Posted 2005) [#2]
No. But you don't need to, BlitzMAX doesn't use a single-pass compiler. If you think you absolutely must have cyclic references use import.


Brendane(Posted 2005) [#3]
Thanks FlameDuck. I managed to resolve the problem by making judicial use of Import - it's quite easy to get a cyclic import situation; a simple forward declaration would have avoided that and allowed me to keep the design I had arrived at. This is probably because I'm so used to writing C++, I'll see how I get on with BlitzMAX, since I've only just bought it tonight after a couple of days playing with the demo.

I'm so pleased to finally have Blitz with OOP, it's like being let out of prison (I imagine!)


FlameDuck(Posted 2005) [#4]
I'm so pleased to finally have Blitz with OOP, it's like being let out of prison (I imagine!)
Compared to C++? Most definately. :o> The OO is certainly nice, don't get me wrong, but the most important feature of BlitzMAX IMHO is the way you can get right to programming your domain logic.