simple C language programming question

M

Mabden

Martin Dickopp said:
Followup-To: poster set to prevent further flaming in the group.

You are very quick to judge someone that you don't know, about a topic you
aren't involved in. I am not "flaming a group", I am suggesting that a
specific person may have crossed a fuzzy line. My own opinion only, and not
directed at anyone else. You are now crossing another line, that of too
quick judgment, in my opinion.

You'll find that people who post on newsgroups all have opinions. And you
are not required to agree with them, but you are not asked to respond to
them either. I certainly believe I could do without your responses to my
posts, so feel free to ignore posts with my name on them.
 
M

Martin Dickopp

Mabden said:
You are very quick to judge someone that you don't know, about a topic
you aren't involved in.

I'm involved because I also replied to the OP.
I am not "flaming a group", I am suggesting that a specific person may
have crossed a fuzzy line.

AFAIKT you're the one who started ad hominem attacks.
You'll find that people who post on newsgroups all have opinions. And
you are not required to agree with them, but you are not asked to
respond to them either.

I think you fundamentally misunderstand newsgroups. In newsgroups, one
doesn't have to be asked or somehow invited before one is allowed to
respond to any posting. The only wrong thing I'm doing is participation
in an off-topic thread, but it is perfectly within my rights to reply to
you, even if your posting wasn't directed towards me.

If you want to say something which is only intended for one person, mail
him/her instead of posting to the newsgroup.
I certainly believe I could do without your responses to my posts,

Given that you even replied to one of my postings /twice/, I don't
believe you. :)
so feel free to ignore posts with my name on them.

If you can do without my responses, why should /I/ ignore /you/ instead
of vice versa? Isn't that a bit illogical? I have no intention to
ignore you.

However, since you ignored my Followup-To, I will indeed ignore you in
this particular thread, in order to prevent further off-topic postings.

Martin
 
M

Martin Dickopp

Mabden said:
I don't think the kid did much at all other than open a file and read
characters until EOF.

Actually, he did one more thing, which is a very important part of the
solution.

Martin
 
M

Mark McIntyre

You know, I wasn't even replying to you, but rather to CBFalconer.

So? This is usenet, not a private chat room.
Why are you jumping in?

Hint: in usenet, anyone can comment on a post.
All I see is YOU attacking ME.

Hmm... You posted ad hominem attacks on someone...

Nice move - plonking a regular. Guaranteed to make you feel really lonely
round here....
 
K

Keith Thompson

Scott J. McCaughrin said:
: Hi, I have a homework question, can some expert help me with this.

: q.Write a program that reads a text file and reports the number of
: integers and you may assume a number is defined as one or more digits
: separated by one or whitespace characters or punctuations.

The problem is ill-posed, as stated. 123.45 is not an integer, but '.'
is punctuation, so this number would be reported as 2 integers.

Yes, it would. How does that imply that the problem is ill-posed?
Are you assuming that 123.45 must be interpreted as a real number?
It's equally legimimate to treat it as two integers separated by a
punctuation character. (Think about version numbers or IP addresess.)

On the other hand, it is a bit ill-posed in that it doesn't address
characters other than digits, whitespace, or punctuation.
 
M

Mabden

Mark McIntyre said:
So? This is usenet, not a private chat room.


Hint: in usenet, anyone can comment on a post.


Hmm... You posted ad hominem attacks on someone...


Nice move - plonking a regular. Guaranteed to make you feel really lonely
round here....

Ummmm... oops.

Actually I only tagged him as plonked!

Of course I now realize my outstanding mistake. I was completely wrong. I
only hope my stupid, dimwitted difference of opinion didn't infect the minds
of any of the readers of this group. I was wrong. I was mistaken. I ran out
of gas! I had a flat tire. I - I didn't have enough money for cab fare. My
Tux didn't come back from the cleaners. An old friend came in from out of
town. Someone stole my car. There was an earthquake! A terrible flood!
Locust! It wasn't my fault, I swear to God!
 
M

Mabden

Martin Dickopp said:
Followup-To: poster set to prevent further flaming in the group.

Martin

I don't know what this means. What is "Followup-to: poster"?

How can someone "set" this? Nevermind that,

why does someone set this?
 
D

Dik T. Winter

>
> Yes, it would. How does that imply that the problem is ill-posed?
> Are you assuming that 123.45 must be interpreted as a real number?
> It's equally legimimate to treat it as two integers separated by a
> punctuation character. (Think about version numbers or IP addresess.)
>
> On the other hand, it is a bit ill-posed in that it doesn't address
> characters other than digits, whitespace, or punctuation.

That does not make it ill-posed. It is clearly said: "you may assume",
so you also may assume that such characters do not occur in the input.
 
M

Martin Dickopp

Dik T. Winter said:
That does not make it ill-posed. It is clearly said: "you may assume",
so you also may assume that such characters do not occur in the input.

IMHO, it is always wrong to make assumptions about externally provided
data, and this principle should be taught right from the beginning.

I see two possibilities what could be done here if letters adjacent to
digits appear in the input: Ignore them (i.e. don't count them as a
number) or terminate the program with a meaningful error message. But
if the intention of the assignment is not to deal with this case at all,
then I'd say the assignment is outright dangerous.

Martin
 

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,777
Messages
2,569,604
Members
45,216
Latest member
topweb3twitterchannels

Latest Threads

Top