missing HexString documentation

Kagamin spam at here.lot
Thu Feb 8 10:46:19 UTC 2018


On Wednesday, 7 February 2018 at 17:01:54 UTC, Adam D. Ruppe 
wrote:
> http://dpldocs.info/experimental-docs/source/core.sys.posix.fcntl.d.html#L123
>
>    version (X86)
>     {
>         enum O_CREAT        = 0x40;     // octal     0100
>         enum O_EXCL         = 0x80;     // octal     0200
>         enum O_NOCTTY       = 0x100;    // octal     0400
>         enum O_TRUNC        = 0x200;    // octal    01000

Dunno, hex reads better here. Octal is only good for unix 
permissions which are grouped by 3 bits, which is not the case 
for io constants - these are usual ungrouped flags that are 
always done with hex and are easier to understand in hex. If 
you're desperate, octal can be also written as (1<<6)|(2<<3)|(4).


More information about the Digitalmars-d mailing list