Is anyone familiar with the "Goes-To" operator? Consider the following code:
#include <stdio.h>
int main(int argc, char* argv[])
{
int x = 10;
while( x --> 0 ) // x goes to 0
{
printf("%d ", x);
}
return 0;
}
This actually compiles and runs (seriously). Source:
Crap like thqat is a pet peeve of mine ...
While (even)
while(x-->0)
might compile, I'd feel a LOT better seeing
while( x-- > 0 )
.. I ain't no damed 'puter, let IT read that crap if i wants to. ;)
Re: Goes-To operator (humor)
By: Phill Terry to NIGHTFOX on Thu Dec 31 2009 15:31:00
Crap like thqat is a pet peeve of mine ...
While (even)
while(x-->0)
might compile, I'd feel a LOT better seeing
while( x-- > 0 )
.. I ain't no damed 'puter, let IT read that crap if i wants to. ;)
I know what you mean, and I feel the same way.. I think source code should b
easily readable. Another one of my pet peeves is source code that uses very NI>little spaces - For example:
int x=3;
for (int y=0; y<5; y++)
I think those are more easily readable as:
int x = 3;
for (int y = 0; y < 5; y++)
Sysop: | Darkmage |
---|---|
Location: | Tucson, Arizona USA |
Users: | 3 |
Nodes: | 4 (0 / 4) |
Uptime: | 72:53:34 |
Calls: | 2 |
Calls today: | 2 |
Files: | 19 |
U/L today: |
1 files (4K bytes) |
D/L today: |
136 files (6,106K bytes) |
Messages: | 35,389 |
Posted today: | 12 |