How to we return two values from a function?

B

Ben Pfaff

jayapal said:
whats going on .... in these thread...

Many posters chose to comment on my signature, rather than on the
substantive content of my article. I can't imagine why, as I do
believe that it conformed to all Usenet conventions.

But we did answer your question, didn't we? If not, please
explain what is still unclear and I'm sure that we can help you
out.
 
T

Tor Rustad

jayapal said:
Hi all,

Is there any way to return two values from a
function ....................

C has pointers, which can return the address of the object you
like. Example:

T* foo(size_t N)
{
return malloc( N * sizeof (T) );
}
 
R

Richard Heathfield

Ben Pfaff said:
Many posters chose to comment on my signature, rather than on the
substantive content of my article. I can't imagine why,

Well, this is a *news*group, and your signature did, after all, contain
news (whereas the article itself, though sound enough, was relatively
unnewsy to many of its readers).
 
C

Charlie Gordon

Keith Thompson said:
Congratulations!

Now that you're a doctor, I've been having this odd pain in my left
shoulder ...

Sounds like the emacs shoulder syndrome: chronic pain caused by compulsive
stress keeping the left ctrl and/or alt keys down, further complicated by
the computing industry having moved these keys to unhandy locations over
time.
 
F

Flash Gordon

Richard Heathfield wrote, On 30/10/07 22:36:
Ben Pfaff said:


Well, this is a *news*group, and your signature did, after all, contain
news (whereas the article itself, though sound enough, was relatively
unnewsy to many of its readers).

Also no one was complaining about your sig, which was indeed an
appropriate way for you to distribute this piece of good news. I would
say the number of people commenting on it was a measure of the regard in
which you (Ben) are held.
 
M

Mark McIntyre

Now that you're a doctor, I've been having this odd pain in my left
shoulder ...

If I had a pound for every time I've heard /that/ joke, I'd have...
euh.... some money...
--
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
 
S

SM Ryan

# On Tue, 30 Oct 2007 17:10:28 -0700, in comp.lang.c , Keith Thompson
#
# >Now that you're a doctor, I've been having this odd pain in my left
# >shoulder ...
#
# If I had a pound for every time I've heard /that/ joke, I'd have...
# euh.... some money...

You do have to admire the clique's willingness to chase away what
they decide are off topic posts to maintain the topicality of
comp.lang.c and minimise irrelevant chatter.
 
R

Richard Heathfield

SM Ryan said:
# On Tue, 30 Oct 2007 17:10:28 -0700, in comp.lang.c , Keith Thompson
#
# >Now that you're a doctor, I've been having this odd pain in my left
# >shoulder ...
#
# If I had a pound for every time I've heard /that/ joke, I'd have...
# euh.... some money...

You do have to admire the clique's willingness to chase away what
they decide are off topic posts to maintain the topicality of
comp.lang.c and minimise irrelevant chatter.

Yes, I do, although I wouldn't call them a "clique" - in clc, TINC.

I also admire their ability to distinguish between "off-topic chatter that
politely enlivens group dynamics and is done and dusted in a few short
posts" and "off-topic discussions which run the risk of blurring the focus
of the group". No sensible person is going to take Keith's remark to Ben
as being indicative of medical discussions being topical here, and so no
harm is done to the group's overall focus.

I find it surprising that a sensible non-troll such as yourself should not
have noticed this rather obvious distinction.
 
P

Philip Potter

Charlie said:
Sounds like the emacs shoulder syndrome: chronic pain caused by compulsive
stress keeping the left ctrl and/or alt keys down, further complicated by
the computing industry having moved these keys to unhandy locations over
time.

I have a vi-al of something which will help that.
 
C

Chris Dollin

Ben Pfaff wrote:

.... a signature that expressed his doctoral status. Belated congratulations.
The printout awaits perusal. (A4 is too big for comfortable reading on the
way to/from the train ...)
 

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

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,160
Latest member
CollinStri
Top