another stupid c bug. (endless for loop)

S

Skybuck Flying

Keith Thompson said:
You merely have to understand how C for loops work. i is an unsigned
short; on your system, unsigned short apparently has a maximum value
of 65535. You use the condition "i <= 65535"; a little thought would
reveal that this is always going to be true.

A C for loop is not defined to iterate over a specified range. Any C
textbook will tell you how it is defined. Take a moment to look it up.

Incidentally, your use of vulgar language is going to get you into a
lot of killfiles. Some people are understandably offended. I'm not
offended, just annoyed and bored.

Apparently you hate C. That's your right. I encourage you to stop
using it, and to stop participating in the comp.lang.c newsgroup. C
is not a perfect language, and most of us know its flaws far better
than you do. Your help is not needed here.

On the contrary... C needs big bad assess like me to wack you against the
head lol.

Until C is a decent language :p
 
K

Kelsey Bjarnason

[snips]

On the contrary... C needs big bad assess like me to wack you against the
head lol.

Until C is a decent language :p

C is a decent language. No language, however, can prevent bad coders from
writing bad code. You need to learn how to use the language; if you can't
or won't do that, fine, go use something else.
 
M

Mark McIntyre

On the contrary... C needs big bad assess like me to wack you against the
head lol.

So, you write bad C, its pointed out to you, you mouth off, you get told
you're a silly billy, and you start acting like you're big and clever and
trying to intimidate people with faux street-talk.

Yeah, whatever. Come back when you're grown up enough to know when to hold
and when to fold.
 
S

Skybuck Flying

Keith Thompson said:
You merely have to understand how C for loops work. i is an unsigned
short; on your system, unsigned short apparently has a maximum value
of 65535. You use the condition "i <= 65535"; a little thought would
reveal that this is always going to be true.

Oh shut up... I will just react because other silly dumbassess like you
might actually believe you're shit.

Just search for code like this:

(for i=0; I<some_field; i++)

As soon as some_field equals 65535 and I happens to be an unsigned short the
code will loop forever :D

Some thing will happen if it's 32 bit.

HEHEHEHEHEHE

ALL YOUR BASE BELONG TO US LOL.
 
J

Joona I Palaste

Kelsey Bjarnason said:
[snips]
On the contrary... C needs big bad assess like me to wack you against the
head lol.

Until C is a decent language :p
C is a decent language. No language, however, can prevent bad coders from
writing bad code. You need to learn how to use the language; if you can't
or won't do that, fine, go use something else.

I'm amazed there are people here who still haven't killfiled the troll
"Skybuck Flying". What perverse pleasure do they get from reading his
utterly moronic drivel?
 
M

Michael Scarlett

This reminds me of the man who took a chain-saw back to return it,
saying that it was the worst machine in the world and took him hours to
cut through a two foot log. The salesman started it up to see what was
wrong and the man yelled "Hey, What's that sound?!"


...........................................................



I bought a hammer the other day and it wouldn't screw in the screw i
wanted. It was an expensive hammer too. Stupid hammer.
 
F

Fao, Sean

Skybuck said:
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

What amazes me is that you created the problem and then bitch that it
doesn't work. Remember, C goes by the philosophy that the programmer
knows what he's doing. Don't bother programming in C until you
understand the constraints of a variable. This wasn't a problem with
the language, it was a problem with you.

And yes, the quote at the end of this message *is* directed towards you.

--
Sean

"The problem with the world is stupidity. Not saying there should
be a capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?", Unknown.
 
S

Skybuck Flying

Fao said:
What amazes me is that you created the problem and then bitch that it
doesn't work. Remember, C goes by the philosophy that the programmer
knows what he's doing. Don't bother programming in C until you
understand the constraints of a variable. This wasn't a problem with
the language, it was a problem with you.

And yes, the quote at the end of this message *is* directed towards you.

Hhahahahaha.

This attidude... like the programmer should know it's language is why C
programs generally sucks ass and contain insane ammounts of bugs
hahahahahaha.
--
Sean

"The problem with the world is stupidity. Not saying there should
be a capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?",
Unknown.
 
T

Thomas Matthews

Skybuck said:
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 shit:

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

"There is nothing more amazing than stupidity in action."
-- Thomas Matthews


--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book
 
K

Kenneth Brody

Skybuck Flying wrote:
[...]
This attidude... like the programmer should know it's language is why C
programs generally sucks ass and contain insane ammounts of bugs
hahahahahaha.
[...]

C lets smart programmers write smart programs. Unfortunately, in order
to give them this ability, it also allows dumb programmers to write dumb
programs, as you have so eloquently demonstrated.

(And I'll leave the "*BLAM* *BLAM*" for "it's" for someone else.)

((And yes, it's a slow day. Why do you ask?))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top