Is -1 > 7 ?

luka8088 luka8088 at owave.net
Wed Aug 14 12:28:25 PDT 2013


On 9.8.2013. 17:11, michaelc37 wrote:
> forgive me if i'm doing something stupid, i'm extremely tired and trying
> to avoid drinking coffee.
>
> void main()
> {
> int[] arr = [0, 1, 2, 3, 4, 5, 6];
>
> //check 1
> if (-1 > arr.length)
> writefln("WTF -> %d is greater than %d ????", -1, arr.length);
> else
> writefln("GOOD -> %d is NOT greater than %d", -1, arr.length);
> }
>
> here is my output:
> WTF -> -1 is greater than 7 ????

http://forum.dlang.org/thread/kn3f9v$25pd$1@digitalmars.com


More information about the Digitalmars-d-learn mailing list