Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #61129

Re: Syntax error?

From Ben Bacarisse <ben.lists@bsb.me.uk>
Newsgroups comp.lang.c
Subject Re: Syntax error?
Date 2015-04-26 13:40 +0100
Organization A noiseless patient Spider
Message-ID <87vbgj12rj.fsf@bsb.me.uk> (permalink)
References <mhg0mq$f25$1@dont-email.me> <mhiaif$7fj$1@news.albasani.net> <mhidu2$igd$1@dont-email.me> <mhif2c$mkd$1@dont-email.me>

Show all headers | View raw


Bartc <bc@freeuk.com> writes:
<snip>
> Also, there is this example:
>
> int *fred(int);   // prototype for above
> int *ptr;         // pointer to int
>
> If I add parentheses around the *name parts:
>
> int (*fred)(int);
> int (*ptr);
>
> The int pointer is unaffected, but the first line now turns from a
> function returning a pointer, to a pointer to a function!

Of course.  Randomly adding parentheses into some syntax may alter the
meaning.  I really don't think that needs an exclamation mark.  I get
that you don't like the syntax, but this most recent objection to it --
that it is not immune to the insertion of key syntactic elements -- is
just daft.

<snip>
-- 
Ben.

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Syntax error? Bartc <bc@freeuk.com> - 2015-04-25 13:19 +0100
  Re: Syntax error? Richard Damon <Richard@Damon-Family.org> - 2015-04-25 11:07 -0400
  Re: Syntax error? jacobnavia <jacob@jacob.remcomp.fr> - 2015-04-25 18:03 +0200
    Re: Syntax error? Bartc <bc@freeuk.com> - 2015-04-25 17:26 +0100
      Re: Syntax error? jacobnavia <jacob@jacob.remcomp.fr> - 2015-04-25 19:28 +0200
  Re: Syntax error? Johannes Bauer <dfnsonfsduifb@gmx.de> - 2015-04-26 11:19 +0200
    Re: Syntax error? Bartc <bc@freeuk.com> - 2015-04-26 11:17 +0100
      Re: Syntax error? Bartc <bc@freeuk.com> - 2015-04-26 11:36 +0100
        Re: Syntax error? Ben Bacarisse <ben.lists@bsb.me.uk> - 2015-04-26 13:40 +0100
          Re: Syntax error? Bartc <bc@freeuk.com> - 2015-04-26 19:27 +0100
            Re: Syntax error? Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-04-26 12:38 -0700
              Re: Syntax error? Bartc <bc@freeuk.com> - 2015-04-26 22:26 +0100
            Re: Syntax error? Keith Thompson <kst-u@mib.org> - 2015-04-26 12:41 -0700
            Re: Syntax error? Ben Bacarisse <ben.lists@bsb.me.uk> - 2015-04-27 01:53 +0100
      Re: Syntax error? Bartc <bc@freeuk.com> - 2015-04-26 13:24 +0100
  Re: Syntax error? Tim Rentsch <txr@alumni.caltech.edu> - 2015-04-26 07:01 -0700
    Re: Syntax error? Bartc <bc@freeuk.com> - 2015-04-26 19:55 +0100
      Re: Syntax error? Robert Wessel <robertwessel2@yahoo.com> - 2015-04-27 02:39 -0500
      Re: Syntax error? Tim Rentsch <txr@alumni.caltech.edu> - 2015-04-28 08:34 -0700

csiph-web