?If Defined

BlitzMax Forums/BlitzMax Programming/?If Defined

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Ive decided to put all my types into seperate files, which seemed a sencible thing to do when I started, and with the first few was realy simple.

Unfortunatly Ive got to the cyclic reference ones, and the duplicate dependancey ones, so Im starting to get Duplicated Definition errors. (I realise that when Ive actualy fininshed then it wont be a problem, but at the moment it is)

So, I remember from CS classes that VC had a IF not Defined thing were by you defined a system variable inside the if, then if it was defined the next time then it wouldnt include the file. So.
?If Not Defined MyTypeFlag
Include "MyType.Bmx"
?Endif
Then in "MyType.Bmx"
?Define MyTypeFlag = True
Can I do this in Bmax, if not what can I do to achieve the same effect

I realise That I could just do it and try, but then I would missout on all you advice ;)

Thanks