linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: wwp <subscript@free.fr>
To: linux-c-programming@vger.kernel.org
Subject: Re: How to prototype functions that return pointers
Date: Sat, 25 Jun 2005 08:22:18 +0200	[thread overview]
Message-ID: <20050625082218.344489e9@localhost.localdomain> (raw)
In-Reply-To: <42BC8043.9030904@colannino.org>

Hello James,


On Fri, 24 Jun 2005 14:50:59 -0700 James Colannino <james@colannino.org>
wrote:

> Richard Nairn wrote:
> > Believe the correct decleration is (char *) readline();
> > 
> > Order of ops.
> 
> That was the next one I tried.  That yielded a syntax error.  I found
> out though that the "two or more data types" error was the result of a
> more difficult bug to find that had to do with something in another
> header file.  Once I fixed that, the declaration char * readline();
> worked.  Needless to say I'm very embarassed now... :-P

Moreover, the following ones are (should be) identical towards the C parser,
spaces between those tokens are not mandatory or can be repeated, and depend
on the coding style and recommendation/standard you follow:

char * readline();
char *readline();


Regards,

-- 
wwp

  reply	other threads:[~2005-06-25  6:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-24 21:25 How to prototype functions that return pointers James Colannino
     [not found] ` <op.ssv8s2eyizdgzp@mail.nairnconsulting.ca>
2005-06-24 21:50   ` James Colannino
2005-06-25  6:22     ` wwp [this message]
2005-06-25  6:56 ` Steve Graegert
2005-06-26  3:36 ` Glynn Clements

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050625082218.344489e9@localhost.localdomain \
    --to=subscript@free.fr \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).