>>8
It's a waste of a vertical line, it also looks like shit. If anything, put the return type on a line of its own and make sure the function's name starts on the first column so functions can easily be found with grep ^function.
Name:
Anonymous2008-03-06 17:06
>>9 It's a waste of a vertical line, it also looks like shit.
That's why we use FIOC in BBCode.
You are testing if number == 2, then if 3, so it will always be true as 3 is true.
Also, READ SICP
Name:
Anonymous2008-03-06 17:33
Since nobody else has actually included what the right code is, here you go...
if (number == 2 || number == 3)
The operators == || && all take two numbers and produce either 0 or 1.
== produces 1 if the two numbers are equal and 0 otherwise.
|| produces 0 if both numbers are 0 and 1 otherwise.
&& produces 1 if both numbers are 1 and 0 otherwise.
Hence, (number == 2 || 3) can be read as (number == 2) || 3, regardless of what the left side of || is, the right side is 3, which is not 0, and so the || returns 1 (true).
>>13 regardless of what the left side of || is, the right side is 3, which is not 0, and
You mean "regardless of what the *right* side is, if the left side is true, then right side is not evaluated".
faggot.
Name:
Anonymous2008-03-06 19:27
>>18
While what you're saying is true, it doesn't have anything to do with what >>13 was trying to say.
Name:
Anonymous2008-03-06 19:33
>>13 && produces 1 if both numbers are 1 and 0 otherwise.
No, it produces 1 if both numbers are non-zero.
Allocation than Pascal anyhow And I had been hired to write a FORTRAN compiler for this I think the DEVELOPER OF BBCODE USED AN IDE not just an excuse not to hate it is unscientific and ultimately ungrammatical Well not as cool as I wanted but.