D - integer literals - in binary
- imr1984 (5/5) Feb 03 2004 ok so all C based languages can do this:
- Vathix (4/7) Feb 03 2004 It's supported. Give it a try.
- Stephan Wienczny (6/17) Feb 03 2004 Have a look at
- Matthew (3/8) Feb 03 2004 AFAIUI, D already supports this, although I do not know the precise synt...
ok so all C based languages can do this: int x = 0xFF; //255 what about this: int x = 0b11111111; //255 this would be very useful especially for defining flags
Feb 03 2004
int x = 0b11111111; //255 this would be very useful especially for defining flagsIt's supported. Give it a try. -- Christopher E. Miller www.dprogramming.com
Feb 03 2004
imr1984 wrote:ok so all C based languages can do this: int x = 0xFF; //255 what about this: int x = 0b11111111; //255 this would be very useful especially for defining flagsHave a look at http://digitalmars.com/d/lex.html There look at Integer Literals -> binary D supports exactly the notation you suggest... Stephan
Feb 03 2004
AFAIUI, D already supports this, although I do not know the precise syntax "imr1984" <imr1984_member pathlink.com> wrote in message news:bvo5a9$2mqs$1 digitaldaemon.com...ok so all C based languages can do this: int x = 0xFF; //255 what about this: int x = 0b11111111; //255 this would be very useful especially for defining flags
Feb 03 2004