On 4/6/14, Gustavo gbusc...@hotmail.com wrote:
In the page http://dlang.org/type.html I believe there is a typo
stating that bool is 1 byte instead of 1 bit.
static assert(byte.sizeof == 1); // 1 *byte*
Am Mon, 7 Apr 2014 08:48:02 +0200
schrieb Andrej Mitrovic andrej.mitrov...@gmail.com:
On 4/6/14, Gustavo gbusc...@hotmail.com wrote:
In the page http://dlang.org/type.html I believe there is a typo
stating that bool is 1 byte instead of 1 bit.
static assert(byte.sizeof == 1); // 1 *byte*
On 4/7/14, Marco Leise marco.le...@gmx.de wrote:
static assert(bool.sizeof == 1); // 1 *byte*
There I fixed it ;)
LOL!
In the page http://dlang.org/type.html I believe there is a typo
stating that bool is 1 byte instead of 1 bit.
On Sunday, 6 April 2014 at 09:30:47 UTC, Gustavo wrote:
In the page http://dlang.org/type.html I believe there is a
typo stating that bool is 1 byte instead of 1 bit.
I don't think it's a typo. Memory is typically byte-addressable
and thus data types are either a byte or larger. Having a data
On Sunday, 6 April 2014 at 09:30:47 UTC, Gustavo wrote:
In the page http://dlang.org/type.html I believe there is a
typo stating that bool is 1 byte instead of 1 bit.
While a boolean is by definition a single bit, it is represented
by programming languages as a byte for various reasons