another stupid c bug. (endless for loop)
From: Skybuck Flying (nospam_at_hotmail.com)
Date: 08/27/04
- Next message: Skybuck Flying: "Re: why isn't delphi self hosting ?"
- Previous message: Bruce Roberts: "Re: How to declare a const array of strings"
- Next in thread: Alan Balmer: "Re: another stupid c bug. (endless for loop)"
- Reply: Alan Balmer: "Re: another stupid c bug. (endless for loop)"
- Reply: Steve Leach: "Re: another stupid c bug. (endless for loop)"
- Reply: Eric Sosman: "Re: another stupid c bug. (endless for loop)"
- Reply: CBFalconer: "Re: another stupid c bug. (endless for loop)"
- Reply: Till Crueger: "Re: another stupid c bug. (endless for loop)"
- Reply: pete: "Re: another stupid c bug. (endless for loop)"
- Reply: Thomas Matthews: "Re: another stupid c bug. (endless for loop)"
- Reply: Fao, Sean: "Re: another stupid c bug. (endless for loop)"
- Reply: Thomas Matthews: "Re: another stupid c bug. (endless for loop)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 27 Aug 2004 18:43:23 +0200
I was just trying to figure out how some C code worked... I needed to make a
loop to test all possible values for a 16 bit word.
Surprise Surprise... C sucks at it... once again :D lol... C is such a bad
language it amazes me everytime :D
Just look at this ***:
unsigned short int i;
// I set i to a large value so one can see the wrap occuring.
for (i=65500; i<65536; i++)
{
// endless loop
}
for (i=65500; i<=65535; i++)
{
// endless loop
}
for (i=65500; i<65536; ++i)
{
// endless loop
}
for (i=65500; i<=65535; ++i)
{
// endless loop
}
There... I tried out all possibilities...
The original loop was something like:
for (i=0; i<=65535; i++)
{
// endless loop
}
Ha ! C SUCKS BALLS
Man... just a simple pascal loop and I would have been done already.
var
i : word;
for i:=0 to 65535 do
begin
end;
Lol... I don't even have to test that code....
I know 100% sure it will work just fine ;)
With C one never knows lol hahahahaha.
NOW GO *** YOURSELF hahahahahaha
- Next message: Skybuck Flying: "Re: why isn't delphi self hosting ?"
- Previous message: Bruce Roberts: "Re: How to declare a const array of strings"
- Next in thread: Alan Balmer: "Re: another stupid c bug. (endless for loop)"
- Reply: Alan Balmer: "Re: another stupid c bug. (endless for loop)"
- Reply: Steve Leach: "Re: another stupid c bug. (endless for loop)"
- Reply: Eric Sosman: "Re: another stupid c bug. (endless for loop)"
- Reply: CBFalconer: "Re: another stupid c bug. (endless for loop)"
- Reply: Till Crueger: "Re: another stupid c bug. (endless for loop)"
- Reply: pete: "Re: another stupid c bug. (endless for loop)"
- Reply: Thomas Matthews: "Re: another stupid c bug. (endless for loop)"
- Reply: Fao, Sean: "Re: another stupid c bug. (endless for loop)"
- Reply: Thomas Matthews: "Re: another stupid c bug. (endless for loop)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]