[mC V8 PIC] bitwise operator with preprocessor

Discuss about beta versions of mikroC compiler.
Post Reply
Author
Message
bruno
Posts: 767
Joined: 10 Sep 2005 02:10
Location: Lyon, France
Contact:

[mC V8 PIC] bitwise operator with preprocessor

#1 Post by bruno » 10 Feb 2008 17:13

Hello,

xor operator does not work wit preprocessor :

Code: Select all

#define TEST            0xff00
#define NOT_TEST        (TEST ^ 0xffff)

volatile unsigned int  t, not_t ;

void main()
        {
        t = TEST ;
        not_t = NOT_TEST ;
        }
not_t will get 0xffff instead of 0x00ff
Bruno
Bored with 7-segment ? Try the [url=http://www.micro-examples.com/public/microex-navig/doc/079-touchclock.html]TouchClock[/url]

User avatar
rajkovic
mikroElektronika team
Posts: 694
Joined: 16 Aug 2004 12:40

Re: [mC V8 PIC] bitwise operator with preprocessor

#2 Post by rajkovic » 11 Feb 2008 09:51

bruno wrote:Hello,

xor operator does not work wit preprocessor :

Code: Select all

#define TEST            0xff00
#define NOT_TEST        (TEST ^ 0xffff)

volatile unsigned int  t, not_t ;

void main()
        {
        t = TEST ;
        not_t = NOT_TEST ;
        }
not_t will get 0xffff instead of 0x00ff
bug fixed, wiil be included in next release

bruno
Posts: 767
Joined: 10 Sep 2005 02:10
Location: Lyon, France
Contact:

#3 Post by bruno » 11 Feb 2008 10:13

8)
Bruno
Bored with 7-segment ? Try the [url=http://www.micro-examples.com/public/microex-navig/doc/079-touchclock.html]TouchClock[/url]

Post Reply

Return to “mikroC Beta testing”