Quantcast
Channel: MEL PICBASIC Forum
Viewing all articles
Browse latest Browse all 4745

Conditional compile

$
0
0
Hi,
I'm trying to create include file. I need way to create conditional compile based on whether variable is defined or not in main file.
Something like this:
Code:

    #IFNDEF TmpB
        TmpB VAR BYTE
    #ENDIF

If variable is all ready defined, it won't compile just show error:Bad defined value
If variable isn't defined then I got syntax error.
Code:

#IFDEF Counter2
    Counter2=Counter2+1
#ENDIF

For this, if variable isn't define, it's ok, but if is defined then I get Bad defined value.

Is there way to do that?

Viewing all articles
Browse latest Browse all 4745

Trending Articles