 | Also....In JAVA...boolean variable do not take "1" as TRUE....if it is bit based....it is decided on 0 or 1 bit...if it is byte based...it takes the 2's complement of 1 as the TRUE value.... |
Comment History  | Obviously....u know anything about manipulation.....when some one see while(1)....he might manipulate it while only one time....which is completely logical....on the other hand.....any person can manipulate == as something related with equality coz of = sign.....so while (1 is equal to 1) is always more readable..... |
 | Again, while while(1) is not universal, neither while(1==1) is universal. Now, I just want to tell you that I suggested this thing to be corrected as it was for T-Shirt, and that would have taken more space in writing, but i don't think that there is lots of space for "keep on writing" on T-Shirt. :-) |
 | Hi Faizan, First, Ofcourse Every know meaning of -, but not all person know the meaning of ==. Even not all programmers know. eg Shell programming.
Second, At the same pltform you may not be able to use == operator, as operator depends on language used. While "1" is a constant used in most of the language representing TRUE. Even if you are considering JAVA, the value stored in the Boolean variable has Binary value 1 to represent a TRUE. Many platform supports "1" as a TRUE representation.
Third, Yes any fool can get the meaning of "1 equals 1", But I want to make you remember that no one is fool in this world. And how come to make you know that a simple guy can understand == as a comparision operator. |
 | 1 equal to 1 (1==1) is more readable...everyone know what = is....and while(1) is not while(true)....not at all....when u write while 1 is equal to 1.....any fool can get that.... Also....my next point was this only....while(1) is not universally allowed....although while(1==1) is present in most of the languages....including Perl,Java.... |
 | @Faizan: Bhai I don't think non programmer willeven know meaning of == Inspite putting only "1" will give impression of TRUE to any one, Programmer or non.. Again You are a Java Programmer I expected a while(true) from you :) |
Original Post |
|
No comments:
Post a Comment