Bug? Conditionals starting with "C" interpreted as C code

Martin Larsen

Active Member
Licensed User
Longtime User
It seems that all conditionals starting with the letter "C" is interpreted as C code:

B4X:
    #If fanta
    Log("Fanta")
    #End If
    #If cola
    log("Cola")  
    #End If

The compilation stops with this error:
B4X:
b4r_main.cpp:11:6: error: expected constructor, destructor, or type conversion before '(' token
   log("Cola")
      ^

It took me quite some time to figure out why my sketch didn't work (although I wasn't testing for fanta or cola ;))
 
Top