Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Conditions

Name: Anonymous 2011-09-03 10:01

Is it not possible to use
if(0<x<10){}

or do you have to use
if(x>0&&x<10){}

?

Name: Anonymous 2011-09-03 12:04

0<11 will be evaluated as 1 and then 1<11 will return 1.

Which language would this hold true for? For example, in Java, 0 < x is evaluated to a boolean value which cannot be compared with 10.

Left or right associativity is important and if it short-circuited.

I don't think so.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List