is this intended behavior?

Dan murpsoft at hotmail.com
Mon Apr 9 17:42:43 PDT 2007


Tom S Wrote:

> John Demme wrote:
> > unknown wrote:
> > 
> >> Frank Malone Wrote:
> >>>         writefln(c < a ? "true" : "false"); // outputs false

What it appears to be doing incorrectly is attempting to convert -1 to an unsigned value to compute the comparison; which should produce uint.max; while the ubyte may be converting to a uint as well.

(int < ubyte) ought to be reasonable to use.  The fact it isn't never occurred to me, and would demonstrate that the language is still lacking in a couple quite fundamental areas.



More information about the Digitalmars-d mailing list