R
Rui Maciel
spinoza1111 said:I believe I am.
It appears that your memory is very short. Or very selective.
Rui Maciel
spinoza1111 said:I believe I am.
spinoza1111 said:You should have my email requesting that you desist from this
offensive conduct.
I don't like this approach; firstly it doesn't
work in a freestanding environment (that doesn't
have a filesystem accessible via standard functions).
Secondly even if it does work it uses a
comparatively huge amount of work compared
to what it actually does. Nobody would use
this in production, nobody.
Richard Heathfield said:spinoza1111 said:spinoza1111said:
[...]
Consider the possibility that you are mistaken.
[...]
You know he never will.
You should have my email requesting that you desist from this
offensive conduct.
You are in no position to complain about offensive conduct.
jacob navia said:void LogError(char *ErrorMessage,int errorcode, char *callingFunction)
{
// Here you do not know anything about the length of the arguments
}
Chris M. Thomasson said:Fair enough. BTW, ho
Chris M. Thomasson said:I think I have the right to respond to spinoza1111. If that get's me
killfiled, well, shi% happens.
spinoza1111 said:"Does C have call by reference?"
Richard Bos said:Indeed it does.
*Plonk*
There are several people here who are literate above a low bound. What
marks you as a troll is not your literacy (such as it is), but your
insistence that C is a terrible language and that you are going to
demonstrate it to all of us, and your personal attacks on people who
disagree with you.
To develop the "unlimited string" processor which I discuss in the
thread A C Adventure, I have to recreate my utilities library of 1991,
which I did because then (and now) one needs to use the printf
approach to format data: but if one needs, as one often does need, to
format to storage, sprintf has a built in danger that as far as I know
(and correct me if I'm wrong) nobody has or will fix inside of C.
The problem is that any sprintf whatsoever, insofar as it formats
strings, has no control over string length. Most code I've seen
decides to create some silly "buffer" of some silly size.
But in
sprintf(buf, "%s\n", ptr)
characters past the allocated end of "buf" may be overwritten.
The C99 solution (limit the number of characters) is extraordinarily
poor and reinforces my Dim View of the ethics of people in that
effort: some of them participated in the "get Schildt" campaign, and
none of them seems to have been competent working programmers.
In 1991, I implemented the GNU solution, but I don't have the code
anymore. This is asprintf; its contract is to always allocate enough
memory to hold the final string.
There are two ways of implementing asprintf. Either iterate formatting
until everything's formatted, reallocating larger and larger blocks of
memory (and copying previously formatted output characters).
Or make a
pass through the data without doing output to find the size needed. My
1991 solution was the former. Today, when I write the code
I shall use the latter solution.
The GNU solution , not the C99 solution, is the one that occurs to the
competent programmer: the C99 solution cuts off the user at the knees
blindly and is the sort of solution that occurs to managers...not
competent programmers.
Richard said:Do you realize that your continued postings of this type bring
annoyance to others and reduces the S/N ratio?
Are you aware of the insults you've been spreading throughout this newsgroup?
You wrote the following sentence:
«How do you know the size of the "buffer" you do need?»
Are you intentionally using words without even knowing their meaning or are you trying to avoid presenting a
concrete case where the programmer doesn'tknow the size of a string he intends to pass to snprintf() by
discussing semantics of the word "know"?
<snip nonsense>
Rui Maciel
Richard Heathfield said:spinoza1111 said:spinoza1111said:
[...]
Consider the possibility that you are mistaken.
[...]
You know he never will.
You should have my email requesting that you desist from this
offensive conduct.You are in no position to complain about offensive conduct.
Richard, I presume you're aware of the point of my remark, namely
that *you* are in a position to improve the S/N ratio of this
newsgroup by ignoring spinoza1111. I'm at a loss to understand
why you continue to feed this troll.
>> You mean that the *usage* of "troll" is analogous to "Jew";
>> however, in that, you're wrong. "Jew" describes an essential
>> quality of a person, whether ethnicity or religion, while "troll"
>> describes a style of anti-social behavior.
troll> Words, mere words, aren't"behavior".
Words are not behavior, no; but the choice of words, the writing of them
into a Usenet post, and the eventual posting of that post *are*
behavior.
troll> When a person (in Navia's case, an accomplished and
troll> intelligent person) has views that don'treinforce the low
troll> "standards" of your community, he is hounded and when he
troll> responds, you blame him for being a "drama queen".
Navia gets the reaction he does because he responds to bug reports and
disagreement as if they were personal attacks.
spinoza1111 said:"Does C have call by reference?"
In teaching, there is a simple approach, and that simple approach is
to teach this:
1. In C, all function arguments are passed "by value." [K&R2, pg 27]
2. Understanding of pointers.
"Call by reference" is extraneous at best. Keep it simple.
spinoza1111 said:From what I have seen here, they probably are. Regulars here
continually interpret data in the worst possible way, for example by
generalizing slips of the "tongue" into claims that a person is
globally ignorant, and regulars here always drift offtopic into
discussions of who's competent and who's "trolling".
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.