473,406 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Why pointers??

Why use pointers at all??

Sep 21 '06 #1
62 4936
onkar wrote:
Why use pointers at all??
Use of *p++ notation rather than p[i++] helps reduce portability to
other languages, which often is a goal. I doubt many would give up both
styles. Or, do you campaign for C not to be used where one of these
notations would be useful?
Sep 21 '06 #2
Op 21 Sep 2006 06:20:50 -0700 schreef onkar:
Why use pointers at all??
Why? Are you afraid they will point at you?
--
Coos
Sep 21 '06 #3

onkar wrote:
Why use pointers at all??
Because it doesn't make sense to use arrays to point to things?

Hint: Do 5 seconds of embedded software work and re-think your
question.

Tom

Sep 21 '06 #4
onkar said:
Why use pointers at all??
No reason at all, if you don't want to. So don't bother, until a need for
them arises.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 21 '06 #5

Richard Heathfield wrote:
onkar said:
Why use pointers at all??

No reason at all, if you don't want to. So don't bother, until a need for
them arises.
Explain to me how you'd use memory mapped I/O then?

Tom

Sep 21 '06 #6
onkar wrote:
Why use pointers at all??
So you can do things you can't easily do without them.
Sep 21 '06 #7
Tom St Denis wrote:
Richard Heathfield wrote:
>onkar said:
>>Why use pointers at all??
No reason at all, if you don't want to. So don't bother, until a need for
them arises.

Explain to me how you'd use memory mapped I/O then?
"...until a need for them arises."
Sep 21 '06 #8
Tom St Denis said:
>
Richard Heathfield wrote:
>onkar said:
Why use pointers at all??

No reason at all, if you don't want to. So don't bother, until a need for
them arises.

Explain to me how you'd use memory mapped I/O then?
My point is this: that the OP will, in due course, discover a need for
pointers. Clearly he or she hasn't yet reached this point. It is not
unusual for newbies to ask this question, and almost invariably anyone who
tries to explain it to them faces a barrage of objections and confusions.

So I thought I'd try a different approach. "Okay, if you don't see a need
for them, great! Do whatever you do, without them." At some point, such an
approach will lead to a brick wall, with a door in it labelled "Pointers"
that swings invitingly ajar.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 21 '06 #9
Richard Heathfield wrote:
So I thought I'd try a different approach. "Okay, if you don't see a need
for them, great! Do whatever you do, without them." At some point, such an
approach will lead to a brick wall, with a door in it labelled "Pointers"
that swings invitingly ajar.
You talk funny.

Tom

Sep 21 '06 #10

onkar wrote:
Why use pointers at all??
Well, in C, it's hard to impossible to do certain things without
resorting to pointers.

If you can get by with arrays and structs and arrays of structs, then
go ahead.

But if you have variable amounts of data, or data structures that can't
be conveniently represented in an array or struct, then pointers are
mighty handy. A can of worms for most folks, if the unbeleivably
simple and dumb questions that get asked about pointers and * and & are
any indication.

One alternative that we used in the old FORTRAN days was to have one
big array, and use INTEGER array indices into that array as "pointers".
Worked good enuf for many cases.

Another alternative is to use a language with first-class data
structures, like Lisp, Perl, Java, or Algol68, where all the pointer
magic is hidden behind the scenes and you just work with, gasp,
*variables*

Sep 21 '06 #11
Tim Prince posted:
Use of *p++ notation rather than p[i++] helps reduce portability to
other languages, which often is a goal.

I haven't a bull's notion what you're talking about.

--

Frederick Gotham
Sep 21 '06 #12
onkar wrote:
Why use pointers at all??
There are plenty of reasons for the existence of pointers. I will give
you one simple example. I am sure other experts in this group will come
up with more.

Often during systems programming (specially on embedded systems), you
want to avoid memory copying. If you call a function and pass a
variable as a parameter (instead of pointer to that variable), the
called function will work on copy of that variable.

Now this variable can be of type struct which is really large and
copying this can be time consuming. Instead, if you just pass pointer
to this struct variable, this extra copying of variable is avoided in
called function.

This type of pointer passing is often used in kernel code to avoid
overhead of memcpy().

Tejas Kokje

Sep 21 '06 #13
onkar wrote:
Why use pointers at all??
Restricted/essential pointers (called references in some languages) are
needed to build dynamic data structures like linked lists, binary trees
and hash tables.

The C language has unrestricted/raw pointers. They can point to any
memory location and with the address-of operator we can retrieve the
address of any variable. Restricted pointers, on the other hand, can
usually only reference structured types (records, objects and arrays).

Raw pointers must be used with great care. With them we can for instance
write a function that returns a pointer to the stack:

int *f(void)
{
int t;

return &t;
}

This is not possible in a language with (only) restricted pointers.
August
Sep 21 '06 #14
Frederick Gotham wrote:
Tim Prince posted:
>Use of *p++ notation rather than p[i++] helps reduce portability to
other languages, which often is a goal.


I haven't a bull's notion what you're talking about.
It's called sarcasm.
August
Sep 21 '06 #15
Op Thu, 21 Sep 2006 18:15:55 GMT schreef August Karlstrom:
onkar wrote:
>Why use pointers at all??

Restricted/essential pointers (called references in some languages) are
needed to build dynamic data structures like linked lists, binary trees
and hash tables.

The C language has unrestricted/raw pointers. They can point to any
memory location and with the address-of operator we can retrieve the
address of any variable. Restricted pointers, on the other hand, can
usually only reference structured types (records, objects and arrays).

Raw pointers must be used with great care. With them we can for instance
write a function that returns a pointer to the stack:

int *f(void)
{
int t;

return &t;
}

This is not possible in a language with (only) restricted pointers.
And with decent warning settings, it won't compile in C too.
You can't return the address of a local variable.
--
Coos
Sep 21 '06 #16
Coos Haak <ch*****@hccnet.nlwrote:
int *f(void)
{
int t;
return &t;
}
And with decent warning settings, it won't compile in C too.
I'm under the impression that a conforming implementation must accept
this function. *Calling* it yields UB, but if it is never called, is
all not well?

--
C. Benson Manica | I *should* know what I'm talking about - if I
cbmanica(at)gmail.com | don't, I need to know. Flames welcome.
Sep 21 '06 #17
Christopher Benson-Manica posted:
Coos Haak <ch*****@hccnet.nlwrote:
int *f(void)
{
int t;
return &t;
}
>And with decent warning settings, it won't compile in C too.

I'm under the impression that a conforming implementation must accept
this function. *Calling* it yields UB, but if it is never called, is
all not well?

Your compiler is non-conforming if it refuses to compile the following
program:

#include <iostream>

int *Func()
{
int t;
return &t;
}

int main()
{
int i; std::cin >i;

if(i) Func();
}

--

Frederick Gotham
Sep 21 '06 #18
Frederick Gotham said:
Your compiler is non-conforming if it refuses to compile the following
program:

#include <iostream>

int *Func()
{
int t;
return &t;
}

int main()
{
int i; std::cin >i;

if(i) Func();
}
gcc -W -Wall -ansi -pedantic -Wformat-nonliteral -Wcast-align
-Wpointer-arith -Wbad-function-cast -Wmissing-prototypes
-Wstrict-prototypes -Wmissing-declarations -Winline -Wundef
-Wnested-externs -Wcast-qual -Wshadow -Wconversion -Wwrite-strings
-Wno-conversion -ffloat-store -O2 -g -pg -c -o foo.o foo.c
foo.c:1: iostream: No such file or directory
make: *** [foo.o] Error 1

So either gcc is wrong, or Mr Gotham is wrong. I'll give you two guesses.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 21 '06 #19
Richard Heathfield posted:
So either gcc is wrong, or Mr Gotham is wrong. I'll give you two guesses.
#include <stdio.h>

int *Func(void)
{
int t;
return &t;
}

int main(void)
{
int i; scanf("%d",&i);

if(i) Func();

return 0;
}

--

Frederick Gotham
Sep 21 '06 #20
"Tom St Denis" <to********@gmail.comwrites:
Richard Heathfield wrote:
>So I thought I'd try a different approach. "Okay, if you don't see a need
for them, great! Do whatever you do, without them." At some point, such an
approach will lead to a brick wall, with a door in it labelled "Pointers"
that swings invitingly ajar.

You talk funny.
No, he writes amusingly.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Sep 21 '06 #21
Frederick Gotham said:
Richard Heathfield posted:
>So either gcc is wrong, or Mr Gotham is wrong. I'll give you two guesses.

#include <stdio.h>
Good guess, and well corrected.

You still have another outstanding error that needs correcting - an apology
to Keith Thompson. Don't leave it too long.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 21 '06 #22
Tom St Denis wrote:
Richard Heathfield wrote:
>So I thought I'd try a different approach. "Okay, if you don't see a need
for them, great! Do whatever you do, without them." At some point, such an
approach will lead to a brick wall, with a door in it labelled "Pointers"
that swings invitingly ajar.

You talk funny.
Better than speaking poorly.
Sep 21 '06 #23
On 21 Sep 2006 06:20:50 -0700, in comp.lang.c , "onkar"
<on*******@gmail.comwrote:
>Why use pointers at all??
How else would you point to things?

(its a homework question, or else a stupid one, its like saying "why
use sausages at all?". )
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Sep 21 '06 #24
onkar wrote:
>
Why use pointers at all??
To point at objects.

--
Some informative links:
news:news.announce.newusers
http://www.geocities.com/nnqweb/
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.caliburn.nl/topposting.html
http://www.netmeister.org/news/learn2quote.html

--
Posted via a free Usenet account from http://www.teranews.com

Sep 21 '06 #25
Ancient_Hacker wrote:
onkar wrote:
>Why use pointers at all??

Well, in C, it's hard to impossible to do certain things without
resorting to pointers.

If you can get by with arrays and structs and arrays of structs,
then go ahead.
array references are automatically converted to pointers in most
cases. Especially when passing an array as a function parameter.
So you can to all practical purposes eliminate the use of arrays
also. Now you need to name each component of your original array,
and dispense with indices. What fun.

--
Some informative links:
news:news.announce.newusers
http://www.geocities.com/nnqweb/
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.caliburn.nl/topposting.html
http://www.netmeister.org/news/learn2quote.html

--
Posted via a free Usenet account from http://www.teranews.com

Sep 21 '06 #26
August Karlstrom wrote:
>
.... snip ...
>
Raw pointers must be used with great care. With them we can for
instance write a function that returns a pointer to the stack:

int *f(void)
{
int t;

return &t;
}

This is not possible in a language with (only) restricted pointers.
And this is totally useless, since any dereference of the return
value of f results in undefined behaviour. All you can do with it
is compare it for equality with some other int pointer, and the
result should be false. With one possible exception.

int *p1, *p2;

p1 = f();
p2 = f();
if (p1 == p2) puts("possible, but useless");
puts("One example of undefined behaviour");
return 0;

--
Some informative links:
news:news.announce.newusers
http://www.geocities.com/nnqweb/
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.caliburn.nl/topposting.html
http://www.netmeister.org/news/learn2quote.html

--
Posted via a free Usenet account from http://www.teranews.com

Sep 21 '06 #27
CBFalconer wrote:
August Karlstrom wrote:

int *f(void)
{
int t;
return &t;
}

And this is totally useless, since any dereference of the return
value of f results in undefined behaviour. All you can do with it
is compare it for equality with some other int pointer, and the
result should be false.
Actually the return value is indeterminate:

6.2.4#2
The value of a pointer becomes indeterminate when
the object it points to reaches the end of its lifetime.

so you could be evaluating a trap representation (ie. UB) by
assigning it to a variable. I'm not sure whether:

f();

causes UB or not.

Sep 21 '06 #28
Richard Heathfield posted:
You still have another outstanding error that needs correcting - an
apology to Keith Thompson. Don't leave it too long.
I can think for myself, thank you.

I do not deny the original allegation (in fact, I hereby confirm it). I
condemn the dragging up of old, forgotten business when the only gain is to
cause conflict and breed animosity.

Whether offence was intended or not, or whether offence was taken, is of
little consequence to me at this stage -- in fact, I've long forgotten the
argument.

In "real life", I might be inclined to settle little matters such as these
with dialogue, and other times I might decide that it's better to let
things silently blow over. Different resolutions suit different conflicts.
In internet discussions such as these however, I get a bit lost for words;
I might write a paragraph or two, but then realise that I'm assuming my
audience is of the same culture as mine, and so forth -- at which point I
resign myself to the fact that I simply don't understand how he or she
thinks. Without face-to-face contact, it can be hard to read the other
person.

I don't understand why such offense was taken to the word, "fascist". My
intent to was to poke at you, Kieth, expressing my condemnation of your
attitude to "char unsigned". The intent was to stir you, not to downright
offend you with offensive labels (e.g. such as "son of a bitch",
"shithead", etc.). If you were highly offended by this, then you must
understand that I am at a loss to understand why.

Finally: This is an old, forgotten topic. If I were to call everyone up on
everything bad they'd ever done to me, I wouldn't have any friends. Nor
family come to think of it.

--

Frederick Gotham
Sep 21 '06 #29
Frederick Gotham said:
I don't understand why such offense was taken to the word, "fascist".
Then it's time for you to study a little history, bonehead.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 21 '06 #30
In article <n5********************************@4ax.com>,
Mark McIntyre <ma**********@spamcop.netwrote:
>>Why use pointers at all??
>How else would you point to things?
Well you could let that be the compiler's problem, like it is in many
other languages.

-- Richard
Sep 21 '06 #31
Frederick Gotham wrote:
>
.... snip ...
>
Your compiler is non-conforming if it refuses to compile the
following program:

#include <iostream>

int *Func()
{
int t;
return &t;
}

int main()
{
int i; std::cin >i;

if(i) Func();
}
No, it is non-conforming if it compiles that collection of syntax
errors, undefined behaviour, etc.

--
Some informative links:
news:news.announce.newusers
http://www.geocities.com/nnqweb/
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.caliburn.nl/topposting.html
http://www.netmeister.org/news/learn2quote.html

--
Posted via a free Usenet account from http://www.teranews.com

Sep 22 '06 #32
This is a point of personal privilege. This post contains no topical
material, except that it's indirectly relevant to the topic of
civility in this newsgroup.

Frederick Gotham <fg*******@SPAM.comwrites:
[...]
I don't understand why such offense was taken to the word, "fascist". My
intent to was to poke at you, Kieth, expressing my condemnation of your
attitude to "char unsigned". The intent was to stir you, not to downright
offend you with offensive labels (e.g. such as "son of a bitch",
"shithead", etc.). If you were highly offended by this, then you must
understand that I am at a loss to understand why.
My name is Keith, not Kieth. At least get that right. (It was
probably just an accidental typo, but I'm in no mood to be forgiving
right now.)

I am truly at a loss to understand why you are surprised that I would
take offense at being called a fascist. It was a stupid and offensive
thing to write. I would probably have been slightly *less* offended
if you had called me a "son of a bitch" or a "shithead"; I think of
those as more or less generic insults whose literal meaning is
irrelevant. By calling me a fascist, on the other hand, you
explicitly compared me to the likes of Benito Mussolini, Francisco
Franco, and Adolf Hitler.

And if you don't realize that that's what you did, you need to learn
what the word "fascist" really means.

Your provocation for this was that I criticized your coding style and
advised others not to emulate it.
Finally: This is an old, forgotten topic. If I were to call everyone
up on everything bad they'd ever done to me, I wouldn't have any
friends. Nor family come to think of it.
It's not that old; it was last month. I called you on it at the time,
and you refused to apologize then, when it was a brand new topic fresh
in your memory.

I again call on you to publicly apologize to me for your severe and
unjustified insult. Don't do it because you think I'm forcing you to
(I'm not, and I can't, and I wouldn't if I could). Don't do it because
you think it would keep you out of a few killfiles. Do it because
you were in the wrong, and apologizing is the right thing to do.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Sep 22 '06 #33
CBFalconer wrote:
Frederick Gotham wrote:
... snip ...

Your compiler is non-conforming if it refuses to compile the
following program:

#include <iostream>

int *Func()
{
int t;
return &t;
}

int main()
{
int i; std::cin >i;

if(i) Func();
}

No, it is non-conforming if it compiles that collection of syntax
errors, undefined behaviour, etc.
No. The C standard does not _require_ a conforming implementation to
succeed or fail to compile the above code.

Conformance is generally limited to two things: issuing _at least
one_ diagnostic for constraint violations, and the correct semantic
implementation of strictly conforming programs (subject to
implementation limits.)

Code that is not strictly conforming may or may not require a
diagnostic. If it does, then a conforming compiler must issue it.

But whether such code is accepted, compiled, linked, etc... is
completely at the implementation's discretion. That is the freedom
that undefined behaviour allows.

C99 was the first C standard that actually put a requirement
on an implementation to fail to translate a translation unit. That
was solely for the case of the #error preprocessing directive.

--
Peter

Sep 22 '06 #34
Peter Nilsson wrote:
Conformance is generally limited to two things: issuing _at least
one_ diagnostic for constraint violations, and the correct semantic
implementation of strictly conforming programs (subject to
implementation limits.)

Code that is not strictly conforming may or may not require a
diagnostic. If it does, then a conforming compiler must issue it.

But whether such code is accepted, compiled, linked, etc... is
completely at the implementation's discretion. That is the freedom
that undefined behaviour allows.
It also has to compile conforming (but not strictly conforming)
programs that are don't have any syntax errors or constraint violations.

Sep 22 '06 #35
On 21 Sep 2006 06:20:50 -0700, "onkar" <on*******@gmail.comwrote in
comp.lang.c:
Why use pointers at all??
Don't. That means all your code will need to be in your main()
function, because you can't call a function without using a pointer.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Sep 22 '06 #36
"onkar" <on*******@gmail.comwrote in message
news:11*********************@b28g2000cwb.googlegro ups.com...
Why use pointers at all??
Any non-trivial program needs some sort of mechanism to refer to
non-local objects. In C, these things are called pointers. In newer
languages they are usually called references, because so many
programmers think "pointers" are evil, but they're roughly the same
thing. C makes it easy to shoot yourself in the foot via pointers;
other languages with "references" make it difficult to shoot yourself in
the foot but also make many other interesting and useful things
difficult in the bargain. Power comes with a price, as does safety.

S

--
Stephen Sprunk "God does not play dice." --Albert Einstein
CCIE #3723 "God is an inveterate gambler, and He throws the
K5SSS dice at every possible opportunity." --Stephen Hawking

--
Posted via a free Usenet account from http://www.teranews.com

Sep 22 '06 #37
onkar wrote:
Why use pointers at all??
If the arguments of a function should be modified then the addresses of
them should be passed into the function and the corresponding
parameters should be declared as pointers of type same as the arguments.

Sep 22 '06 #38
lovecreatesbea...@gmail.com said:
onkar wrote:
>Why use pointers at all??

If the arguments of a function should be modified
You can't modify a function's arguments. You can, however, modify the value
of a function parameter.
then the addresses of
them
You can't take the address of an argument. Arguments are expressions, and
expressions in the general case do not necessarily have addresses.
should be passed into the function and the corresponding
parameters should be declared as pointers of type same as the arguments.
What you're trying to explain is /how/ to use a pointer in a function call
to facilitate the modification of an object's value within that function,
but the question is /why/ you would want to do that.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 22 '06 #39
Richard Heathfield posted:
Then it's time for you to study a little history, bonehead.
Is it customary for one to announce their kill-filing of a fellow-poster?

--

Frederick Gotham
Sep 22 '06 #40
Keith Thompson posted:
I again call on you to publicly apologize to me for your severe and
unjustified insult. Don't do it because you think I'm forcing you to
(I'm not, and I can't, and I wouldn't if I could). Don't do it because
you think it would keep you out of a few killfiles. Do it because
you were in the wrong, and apologizing is the right thing to do.

I hereby announce my withdrawal from this discussion.

--

Frederick Gotham
Sep 22 '06 #41
Frederick Gotham said:
Richard Heathfield posted:
>Then it's time for you to study a little history, bonehead.

Is it customary for one to announce their kill-filing of a fellow-poster?
It is customary to apologise when one has been foolish enough to label a
fellow-poster a "fascist". You of all people, being Irish, should be aware
of the harm that can be done when slights and insults are left to rankle.
They should be dealt with swiftly. There is no shame in apologising when
one has been foolish. Indeed, to do so would reflect credit on you in many
people's eyes.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 22 '06 #42
In article <R2*******************@news.indigo.ie>,
Frederick Gotham <fg*******@SPAM.comwrote:
>I don't understand why such offense was taken to the word, "fascist".
As you are almost certainly not referring to the person as having been
a member of an Italian nationalist party from about 1919 to 1943,
then you are referring to him as having "right-wing authoratarion
views".

To some people, this would be highly offensive -- about on par
with referring to an avid Christian as being a "Satanist".
Think of any principle that you *strongly* believe in, and imagine
that someone referred to you as being the exact opposite.

It is, Frederick, the sort of insult that in old days would get
you called out for a duel. These days, some would consider it
a strong enough insult to sue for slander -- and it has a specific
enough meaning that such a lawsuit would be winnable, I believe.
It might interest you to know, Frederick, that there is a specific
sequence in law for slander lawsuits to succeed:

1) The accusation or insult is made;
2) The accusation or insult is denied in the same media as it was
originally placed (rebuttal in kind);
3) The person accused or insulted asks for an apology;
4) The accusor or insulter refuses the apology or fails to act
on it within a reasonable time.

Once this sequence has taken place, the person accused or insulted
could proceed directly to a filing a lawsuit and case law would
recognize the case and allow it to proceed to judgement, especially
if the amount of damages being requested was modest, and especially
if the proceeding was in "small claims court".

For more certainty, or if the request for damages was high, another
couple of steps would normally be inserted:

5) The person accused or insulted has their lawyer send an
official demand of apology (through a certified delivery process)
to the accuser or the accuser's lawyer;
6) The accusor/insulter formally refuses to apologize or fails
to act on it within a reasonable time.

Then on to the lawsuit phase itself.

If these extra formal steps had been taken, judges would be quite
unlikely to dismiss the case on the grounds that the appealant had not
done enough to try to secure an apology out of court.
You might find it instructive, Frederick, to reflect upon the extent
to which this sequence matches recent events.
The other party in this matter does not strike -me- as being
particularily litigious, but my personal assessment of that could
be wrong; and there are always future situations (perhaps involving
other people.)
--
All is vanity. -- Ecclesiastes
Sep 22 '06 #43
[ Excellent article - but nits must be picked, yes? ]

Walter Roberson said:

<snip>
It might interest you to know, Frederick, that there is a specific
sequence in law for slander lawsuits to succeed:
Since Usenet is text-based, it would be libel rather than slander. The
international nature of the case would possibly make for complications,
too. Nevertheless, Mr Gotham is on very shaky ground indeed.

<snip>
The other party in this matter does not strike -me- as being
particularily litigious, but my personal assessment of that could
be wrong; and there are always future situations (perhaps involving
other people.)
Quite so. I sincerely hope that Keith does *not* choose to sue Mr Gotham for
libel, since I happen to think that Usenetters ought to be bright enough to
sort these things out amongst themselves without recourse to a judge who is
most unlikely to be up to speed on Usenet culture. But if Keith did choose
to do so, I could not find it in myself to fault him for making that
choice.

It's not too late, I hope, for Mr Gotham to see reason.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 22 '06 #44
Frederick Gotham <fg*******@SPAM.comwrites:
Keith Thompson posted:
>I again call on you to publicly apologize to me for your severe and
unjustified insult. Don't do it because you think I'm forcing you to
(I'm not, and I can't, and I wouldn't if I could). Don't do it because
you think it would keep you out of a few killfiles. Do it because
you were in the wrong, and apologizing is the right thing to do.

I hereby announce my withdrawal from this discussion.
And from any possibility that I will ever respond to anything you post
other than to correct errors for the benefit of others.

Idiot.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Sep 22 '06 #45
Keith Thompson said:
Frederick Gotham <fg*******@SPAM.comwrites:
>Keith Thompson posted:
>>I again call on you to publicly apologize to me for your severe and
unjustified insult. Don't do it because you think I'm forcing you to
(I'm not, and I can't, and I wouldn't if I could). Don't do it because
you think it would keep you out of a few killfiles. Do it because
you were in the wrong, and apologizing is the right thing to do.

I hereby announce my withdrawal from this discussion.

And from any possibility that I will ever respond to anything you post
other than to correct errors for the benefit of others.
I'm beginning to lose hope that Mr Gotham has the wit to realise just what
line he has crossed.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Sep 22 '06 #46
On 21 Sep 2006 22:35:34 GMT, in comp.lang.c , ri*****@cogsci.ed.ac.uk
(Richard Tobin) wrote:
>In article <n5********************************@4ax.com>,
Mark McIntyre <ma**********@spamcop.netwrote:
>>>Why use pointers at all??
>>How else would you point to things?

Well you could let that be the compiler's problem, like it is in many
other languages.
<flame bait>
Huh? You mean languages where its not possible to point at things,
like Basic ? There's a reason Basic didn't take over the world.
</bait>
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Sep 22 '06 #47
Richard Heathfield <in*****@invalid.invalidwrites:
[snip]
It is customary to apologise when one has been foolish enough to label a
fellow-poster a "fascist". You of all people, being Irish, should be aware
of the harm that can be done when slights and insults are left to rankle.
They should be dealt with swiftly. There is no shame in apologising when
one has been foolish. Indeed, to do so would reflect credit on you in many
people's eyes.
Yes, it would have.

For examples, see:

http://groups.google.com/group/comp.lang.c/msg/be698fc70e7f47dc>
http://groups.google.com/group/comp.lang.c/msg/baa3d673de03668c>

Oh yes, and

http://groups.google.com/group/comp....c874d86dc0d4fd

in which a certain poster accused me of "malicious behavior" and
demanded an immediate apology (which he got).

But I don't think there's much point in continuing this.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Sep 22 '06 #48
Frederick Gotham wrote:
Richard Heathfield posted:
>Then it's time for you to study a little history, bonehead.

Is it customary for one to announce their kill-filing of a
fellow-poster?
It is useful, in that it may alert him to his evil ways. If so,
others in the group may be spared in the future.

--
Some informative links:
news:news.announce.newusers
http://www.geocities.com/nnqweb/
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.caliburn.nl/topposting.html
http://www.netmeister.org/news/learn2quote.html

--
Posted via a free Usenet account from http://www.teranews.com

Sep 22 '06 #49
Mark McIntyre wrote:
On 21 Sep 2006 22:35:34 GMT, in comp.lang.c , ri*****@cogsci.ed.ac.uk
(Richard Tobin) wrote:
In article <n5********************************@4ax.com>,
Mark McIntyre <ma**********@spamcop.netwrote:
>>Why use pointers at all??
>How else would you point to things?
Well you could let that be the compiler's problem, like it is in many
other languages.

<flame bait>
Huh? You mean languages where its not possible to point at things,
like Basic ? There's a reason Basic didn't take over the world.
</bait>
But BASIC has peek and poke so in a sense you can
point at things. Your pointers are simply integers
which hold addresses.

Sep 22 '06 #50

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

27
by: Susan Baker | last post by:
Hi, I'm just reading about smart pointers.. I have some existing C code that I would like to provide wrapper classes for. Specifically, I would like to provide wrappers for two stucts defined...
3
by: ozbear | last post by:
This is probably an obvious question. I know that pointer comparisons are only defined if the two pointers point somewhere "into" the storage allocated to the same object, or if they are NULL,...
9
by: Mikhail Teterin | last post by:
Hello! I'd like to have a variable of a pointer-to-function type. The two possible values are of type (*)(FILE *) and (*)(void *). For example: getter = straight ? fgetc : gzgetc; nextchar...
12
by: Lance | last post by:
VB.NET (v2003) does not support pointers, right? Assuming that this is true, are there any plans to support pointers in the future? Forgive my ignorance, but if C# supports pointers and C# and...
14
by: Alf P. Steinbach | last post by:
Not yet perfect, but: http://home.no.net/dubjai/win32cpptut/special/pointers/ch_01.pdf http://home.no.net/dubjai/win32cpptut/special/pointers/ch_01_examples.zip To access the table of...
92
by: Jim Langston | last post by:
Someone made the statement in a newsgroup that most C++ programmers use smart pointers. His actual phrase was "most of us" but I really don't think that most C++ programmers use smart pointers,...
4
by: Josefo | last post by:
Hello, is someone so kind to tell me why I am getting the following errors ? vector_static_function.c:20: error: expected constructor, destructor, or type conversion before '.' token...
25
by: J Caesar | last post by:
In C you can compare two pointers, p<q, as long as they come from the same array or the same malloc()ated block. Otherwise you can't. What I'd like to do is write a function int comparable(void...
54
by: Boris | last post by:
I had a 3 hours meeting today with some fellow programmers that are partly not convinced about using smart pointers in C++. Their main concern is a possible performance impact. I've been explaining...
2
by: StevenChiasson | last post by:
For the record, not a student, just someone attempting to learn C++. Anyway, the problem I'm having right now is the member function detAddress, of object controller. This is more or less, your...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.