avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-gcc-list] gcc binary


From: Dave Hylands
Subject: RE: [avr-gcc-list] gcc binary
Date: Wed, 3 Mar 2004 09:20:58 -0800

I've seen people create header files with stuff like:

#define b00000000       0
#define b00000001       1
#define b00000010       2
...

This obviously begs to be created with a script of some sort, and you
could create all of the different lenghts from 1 bit thru 8 bit quite
easily.

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/

P.S. Sorry for the double post Doug, I forgot to do reply all on the
first one.

> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On Behalf Of Douglas Dotson
> Sent: Wednesday, March 03, 2004 9:05 AM
> To: cswiger; avr-gcc-list
> Subject: Re: [avr-gcc-list] gcc binary
> 
> 
> I've never seen the 0b notation before.
> Where have you seen it before? I suspect it is some
> vendor-specific extension. I don;t believe it conforms to ANSI C.
> 
> Doug
> 
> --- cswiger <address@hidden> wrote:
> > This should be simple: does gcc not support binary
> > ???
> > I've a snipped of code that initializes an array
> > with
> > 
> > char bitmap[38][7]={
> >         //0
> >         0b01110000,
> >         0b10001000,
> >         0b10011000,
> >         0b10101000,
> >         0b11001000,
> >         0b10001000,
> >         0b01110000,
> > 
> > etc, but I can't get 0bxxxx to work anywhere.
> > 
> > d=110; decimal
> > d=0110; octal
> > d=0x110; hex
> > d=0b110; fails to compile with invalid suffix on
> > integer
> > constant.
> > 
> > Sorry if this is gcc and not avr specific.
> > 
> > --Chuck
> > 
> > 
> > _______________________________________________
> > avr-gcc-list mailing list
> > address@hidden
> > http://www.avr1.org/mailman/listinfo/avr-gcc-list
> 
> 
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://www.avr1.org/mailman/listinfo/avr-gcc-> list
> 
> 


_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list


reply via email to

[Prev in Thread] Current Thread [Next in Thread]