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


Groups > comp.lang.c > #74436

Re: CAlive and char* p1, p2 --vs-- char *p1, p2

From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.lang.c
Subject Re: CAlive and char* p1, p2 --vs-- char *p1, p2
Date 2015-10-31 15:02 +0000
Organization A noiseless patient Spider
Message-ID <87d1vvaxox.fsf@bsb.me.uk> (permalink)
References <582a03dc-3daa-40e1-a7d1-50949914a5df@googlegroups.com> <87d1vvcmdf.fsf@bsb.me.uk> <71c21d38-b2fb-44ac-86b5-771c8cdc2dc8@googlegroups.com>

Show all headers | View raw


"Rick C. Hodgin" <rick.c.hodgin@gmail.com> writes:

> On Saturday, October 31, 2015 at 7:23:55 AM UTC-4, Ben Bacarisse wrote:
>> "Rick C. Hodgin" <rick.c.hodgin@gmail.com> writes:
>> <snip>
>> > CAlive makes pointer declarations more logical.
>> >
>> >     (1)  If the * is located directly beside the type (no whitespaces
>> >          between the type and *), it defines every item thereafter to
>> >          be a pointer to that type.
>> >
>> >     (2)  If, however, the * is located at least one whitespace away from
>> >          the type, the * only applies to the first variable, and then
>> >          must be explicitly applied to any other variables that need to
>> >          be pointers.
>> >
>> > For example:
>> >
>> >     char*   p1, p2, p3;
>> >     // p1, p2, and p3 are all char* variables
>> >
>> >     char    *p4, p5, *p6;
>> >     // p4 and p6 are char*, but p5 is just char
>> 
>> What will the following mean:
>> 
>> 01:  char* *p, q;
>> 02:  char ** p, q;
>> 03:  char *const* p, q;
>
> 01:  p is char**, q is char*.
> 02:  p is char**, q is char.
> 03:  Syntax error at ^

Why the syntax error?

>> Incredibly, you've seized the chance to make C's baroque type
>> declarations even more confusing than they already are and, against the
>> odds, you've done it.
>
> Saying something is a particular way doesn't make it so.

No, of course not.  Nor does not giving a reasoned explanation mean that
a statement is wrong.  In this case it simply means that I know you are
immune to reason (or maybe you just pretend to be), and I am conserving
effort.

<snip>
-- 
Ben.

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


Thread

CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-30 19:40 -0700
  Re: CAlive and char* p1, p2 --vs-- char *p1, p2 supercat@casperkitty.com - 2015-10-30 19:50 -0700
    Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-30 19:56 -0700
      Re: CAlive and char* p1, p2 --vs-- char *p1, p2 supercat@casperkitty.com - 2015-10-31 13:00 -0700
  Re: CAlive and char* p1, p2 --vs-- char *p1, p2 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-10-31 11:23 +0000
    Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-31 07:45 -0700
      Re: CAlive and char* p1, p2 --vs-- char *p1, p2 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-10-31 15:02 +0000
        Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-31 10:52 -0700
          Re: CAlive and char* p1, p2 --vs-- char *p1, p2 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-10-31 20:01 +0000
            Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-31 13:51 -0700
              Re: CAlive and char* p1, p2 --vs-- char *p1, p2 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-10-31 21:43 +0000
                Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-31 17:04 -0700
                Re: CAlive and char* p1, p2 --vs-- char *p1, p2 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-11-01 01:17 +0000
                Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-31 19:20 -0700
              Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Chris M. Thomasson" <nospam@nospam.nospam> - 2015-10-31 16:02 -0700
                Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-31 17:06 -0700
  Re: CAlive and char* p1, p2 --vs-- char *p1, p2 Bartc <bc@freeuk.com> - 2015-10-31 13:54 +0000
    Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-31 07:52 -0700
      Re: CAlive and char* p1, p2 --vs-- char *p1, p2 Richard Damon <Richard@Damon-Family.org> - 2015-10-31 11:16 -0400
        Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-31 10:08 -0700
          Re: CAlive and char* p1, p2 --vs-- char *p1, p2 Richard Damon <Richard@Damon-Family.org> - 2015-10-31 14:00 -0400
        Re: CAlive and char* p1, p2 --vs-- char *p1, p2 gazelle@shell.xmission.com (Kenny McCormack) - 2015-10-31 17:41 +0000
          Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-31 11:03 -0700
            Re: CAlive and char* p1, p2 --vs-- char *p1, p2 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-10-31 20:04 +0000
              Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-10-31 13:56 -0700
                Re: CAlive and char* p1, p2 --vs-- char *p1, p2 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-10-31 21:49 +0000
        Re: CAlive and char* p1, p2 --vs-- char *p1, p2 Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-10-31 12:20 -0700
  Re: CAlive and char* p1, p2 --vs-- char *p1, p2 glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-11-01 04:17 +0000
    Re: CAlive and char* p1, p2 --vs-- char *p1, p2 Chad <cdalten@gmail.com> - 2015-11-01 00:02 -0700
  Re: CAlive and char* p1, p2 --vs-- char *p1, p2 Ian Collins <ian-news@hotmail.com> - 2015-11-01 20:30 +1300
  Re: CAlive and char* p1, p2 --vs-- char *p1, p2 David Brown <david.brown@hesbynett.no> - 2015-11-01 23:48 +0100
    Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-01 16:54 -0800
      Re: CAlive and char* p1, p2 --vs-- char *p1, p2 David Brown <david.brown@hesbynett.no> - 2015-11-02 02:05 +0100
        Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-01 17:12 -0800
          Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-01 17:23 -0800
    Re: CAlive and char* p1, p2 --vs-- char *p1, p2 Tim Rentsch <txr@alumni.caltech.edu> - 2015-11-02 02:28 -0800
      Re: CAlive and char* p1, p2 --vs-- char *p1, p2 raltbos@xs4all.nl (Richard Bos) - 2015-11-10 15:57 +0000
      Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-10 08:11 -0800
        Re: CAlive and char* p1, p2 --vs-- char *p1, p2 Gareth Owen <gwowen@gmail.com> - 2015-11-10 18:34 +0000
          Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-10 10:55 -0800
        Re: CAlive and char* p1, p2 --vs-- char *p1, p2 Tim Rentsch <txr@alumni.caltech.edu> - 2015-11-10 21:08 -0800
          Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-12 05:14 -0800
            Re: CAlive and char* p1, p2 --vs-- char *p1, p2 BartC <bc@freeuk.com> - 2015-11-12 13:31 +0000
              Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-12 06:21 -0800
            Re: CAlive and char* p1, p2 --vs-- char *p1, p2 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-11-12 14:29 +0000
              Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-12 06:36 -0800
              Re: CAlive and char* p1, p2 --vs-- char *p1, p2 supercat@casperkitty.com - 2015-11-12 06:45 -0800
                Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-12 06:48 -0800
                Re: CAlive and char* p1, p2 --vs-- char *p1, p2 David Brown <david.brown@hesbynett.no> - 2015-11-12 15:59 +0100
                Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-12 07:03 -0800
                Re: CAlive and char* p1, p2 --vs-- char *p1, p2 gazelle@shell.xmission.com (Kenny McCormack) - 2015-11-12 16:21 +0000
                Re: CAlive and char* p1, p2 --vs-- char *p1, p2 supercat@casperkitty.com - 2015-11-12 09:09 -0800
                Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-12 09:16 -0800
                Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-12 09:46 -0800
                Re: CAlive and char* p1, p2 --vs-- char *p1, p2 supercat@casperkitty.com - 2015-11-12 09:51 -0800
                Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-12 10:01 -0800
                Re: CAlive and char* p1, p2 --vs-- char *p1, p2 supercat@casperkitty.com - 2015-11-12 11:10 -0800
                Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-12 11:31 -0800
                Re: CAlive and char* p1, p2 --vs-- char *p1, p2 supercat@casperkitty.com - 2015-11-12 12:14 -0800
                Re: CAlive and char* p1, p2 --vs-- char *p1, p2 "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-11-12 12:18 -0800

csiph-web