explain complex c declarations

Discussion in 'C Programming' started by Osiris, May 21, 2007.

  1. Osiris

    Osiris Guest

    Is there a program that can explain complex C declarations like

    char (*(*x[4])( ))[5]

    like so:
    x is array[3] of pointers to functiion returning pointer to array[5]
    of char


    ???
     
    Osiris, May 21, 2007
    #1
    1. Advertising

  2. Osiris

    Tor Rustad Guest

    Osiris wrote:
    > Is there a program that can explain complex C declarations like
    >
    > char (*(*x[4])( ))[5]
    >
    > like so:
    > x is array[3] of pointers to functiion returning pointer to array[5]
    > of char
    >
    >
    > ???


    Yes

    $ cdecl
    Type `help' or `?' for help
    cdecl> explain char (*(*x[4])( ))[5];
    declare x as array 4 of pointer to function returning pointer to array 5
    of char


    --
    Tor <torust [at] online [dot] no>
     
    Tor Rustad, May 21, 2007
    #2
    1. Advertising

  3. Osiris

    Osiris Guest

    On Mon, 21 May 2007 01:59:29 +0200, Tor Rustad <torust_at_online.no>
    wrote:

    >Osiris wrote:
    >> Is there a program that can explain complex C declarations like
    >>
    >> char (*(*x[4])( ))[5]
    >>
    >> like so:
    >> x is array[3] of pointers to functiion returning pointer to array[5]
    >> of char
    >>
    >>
    >> ???

    >
    >Yes
    >
    >$ cdecl
    >Type `help' or `?' for help
    >cdecl> explain char (*(*x[4])( ))[5];
    >declare x as array 4 of pointer to function returning pointer to array 5
    >of char



    ah, of course... You make me remember... thnx
     
    Osiris, May 21, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alan Holloway
    Replies:
    7
    Views:
    366
    -berlin.de
    Aug 5, 2004
  2. Rules for complex declarations

    , Jan 23, 2005, in forum: C Programming
    Replies:
    0
    Views:
    312
  3. Rules for complex declarations

    , Jan 23, 2005, in forum: C Programming
    Replies:
    0
    Views:
    285
  4. Rules for complex declarations

    , Jan 23, 2005, in forum: C Programming
    Replies:
    0
    Views:
    267
  5. pozz

    Comments to explain declarations

    pozz, Oct 21, 2012, in forum: C Programming
    Replies:
    5
    Views:
    304
    ImpalerCore
    Oct 22, 2012
Loading...

Share This Page