Casts and some suggestions to avoid them

Rikki Cattermole alphaglosined at gmail.com
Wed Apr 9 05:35:27 PDT 2014


On Tuesday, 8 April 2014 at 18:38:47 UTC, bearophile wrote:
...
> In 2 cases I have had to cast to convert an array length to 
> type uint to allow the code compile on both a 32 and 64 bit 
> system, to assign such length to some uint value.
...
> Bye,
> bearophile

Personally I design my code around size_t/ptrdiff_t to eliminate
these issues as much as possible. Yeah its more memory but it
does mean less issues with 32/64bit.


More information about the Digitalmars-d mailing list