Gabor Grothendieck <[EMAIL PROTECTED]> writes: > <Ted.Harding <at> nessie.mcc.ac.uk> writes: > > : > : On 25-Jul-04 Gabor Grothendieck wrote: > : > Don't know how Python does it but its not the only one and > : > I believe its often done like this. Rather than have a Boolean > : > type, NULL is defined to be false and anything else is true. > : > If the comparison is TRUE then the right argument is returned; > : > otherwise NULL is returned. .... > : This is weird, and I'm not sure what is being discussed here. > > We were discussing how some other languages string together comparison > operators without an intermediate and to connect them. This discussion > has nothing to do with R other than possibly to understand whether it > could fit within the R framework.
Yes. The other side of the coin is that we do actually use the TRUE/FALSE == 1/0 convention in places. E.g. (x>0)-(x<0) for the sign of x, or x*(x>0) for x left-censored at 0. So changing the current semantics is not really in the cards. Turning x<y<z into a syntax error is on the other hand quite simple (at least according to 5 seconds worth of googling for "yacc nonassoc") and we should probably consider doing so. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
