Re: Binary
- From: "Bruce Roberts" <dontsendtober@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 21 Jun 2006 12:29:33 -0400
"Fons Rave" <fonzzz-at-xs4all-dot-nl> wrote in message
news:449850f8$0$31655$e4fe514c@xxxxxxxxxxxxxxxxx
I can code constants in hex:
const
X = $B01;
But (how) can I code constants in octal and binary ?
Unfortunately Delphi doesn't support binary or octal literals. A shame.
While one cannot write these literals, it is possible to use bit operators
to express such constants.
Const
cBinary = (1 shl 7) or (1 shl 5) or (1 shl 3) or 1;
cOctal = (2 shl 6) or (5 shl 3) or 1;
Not pretty, but useful for those that prefer not to translate to hex.
.
- Follow-Ups:
- Re: Binary
- From: alanglloyd@xxxxxxx
- Re: Binary
- References:
- Binary
- From: Fons Rave
- Binary
- Prev by Date: Re: RichEdit Size
- Next by Date: MiniFAQ Broken Links
- Previous by thread: Re: Binary
- Next by thread: Re: Binary
- Index(es):