Conditional defines bug

Post your requests and ideas on the future development of mikroC PRO for AVR.
Post Reply
Author
Message
REA
Posts: 6
Joined: 23 Dec 2009 08:57

Conditional defines bug

#1 Post by REA » 23 Dec 2009 09:04

Hi mikroElektronika team!

This seems to be a bug.
Construction below is not working, if SomethingDef is not defined:

Code: Select all

#ifdef SomethingDef
#elif
#endif

User avatar
anikolic
mikroElektronika team
Posts: 1775
Joined: 17 Aug 2009 16:51
Location: Belgrade
Contact:

#2 Post by anikolic » 23 Dec 2009 12:36

Hi,
You cannot use #elif with no arguments. For this purpose there is #else directive, but here you have to specify the define argument. Try if this works, even if arguments are not defined by #define:

Code: Select all

  #ifdef SomethingDef
  #elif SomethingElse
  #endif
Best regards,
Aleksandar
Web Department Manager

Post Reply

Return to “mikroC PRO for AVR Wish List”