Apparently unsigned types really are necessary
Kagamin
spam at here.lot
Sun Jan 22 12:44:17 PST 2012
On Sunday, 22 January 2012 at 09:31:15 UTC, Marco Leise wrote:
> So everyone uses int, and we get messages like: "This program
> currently uses -1404024 bytes of RAM". I have strong feelings
> against using signed types for variables that are ever going to
> only hold positive numbers, especially when it comes to sizes
> and lengths.
If you ignore type limits, you're asking for trouble. Imagine you
have 2 gigs of ram and 3 gig pagefile on 32-bit OS. What is the
total size of available memory?
More information about the Digitalmars-d
mailing list