digitalmars.D - Natural Word Length
- Mike (2/2) Dec 24 2013 Is there a type in D that represents is always the unsigned
- Jakob Ovrum (8/10) Dec 24 2013 Yes, use the type `size_t`.
- Marco Leise (6/8) Dec 26 2013 alias =E2=84=95 =3D size_t;
- JR (3/5) Dec 27 2013 One part of me thinks that's absolutely beautiful and another
- Timon Gehr (2/8) Dec 27 2013 size_t is not the type of natural numbers.
Is there a type in D that represents is always the unsigned natural word of the platform?
Dec 24 2013
On Tuesday, 24 December 2013 at 08:57:43 UTC, Mike wrote:Is there a type in D that represents is always the unsigned natural word of the platform?Yes, use the type `size_t`. It is an alias defined in object.d, which is a module part of druntime that is implicitly/automatically imported in all D modules, so `size_t` is available in all D code that uses druntime. Usually questions like this are better aimed at the D.learn group :)
Dec 24 2013
Am Tue, 24 Dec 2013 08:57:41 +0000 schrieb "Mike" <none none.com>:Is there a type in D that represents is always the unsigned=20 natural word of the platform?alias =E2=84=95 =3D size_t; =E2=84=95 myWord =3D 123; --=20 Marco
Dec 26 2013
On Friday, 27 December 2013 at 07:25:46 UTC, Marco Leise wrote:alias ℕ = size_t; ℕ myWord = 123;One part of me thinks that's absolutely beautiful and another part cries out in terror. ;>
Dec 27 2013
On 12/27/2013 12:05 PM, JR wrote:On Friday, 27 December 2013 at 07:25:46 UTC, Marco Leise wrote:size_t is not the type of natural numbers.alias ℕ = size_t; ℕ myWord = 123;One part of me thinks that's absolutely beautiful and another part cries out in terror. ;>
Dec 27 2013