Treating the abusive unsigned syndrome

Derek Parnell derek at psych.ward
Fri Nov 28 12:55:08 PST 2008


On Fri, 28 Nov 2008 17:09:25 +0100, Don wrote:

> 
> It's close, but how can code such as:
> 
> if (x.length - y.length < 100) ...
> 
> be correct in the presence of length > 2GB?

It could be transformed by the compiler into more something like ...

  if ((x.length <= y.length) || ((x.length - y.length) < 100)) ...


-- 
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell



More information about the Digitalmars-d mailing list