February 10, 2002
"Robert W. Cunningham" <rwc_2001@yahoo.com> wrote in message news:3C6631AE.344B648B@yahoo.com...

> May I second that?  I believe elegant declaration of intricate data types
and
> structures inevitably leads to simpler and more direct (and less error
prone)
> programming.
>
> Want to see an extremely powerful declaration syntax?  Look at APL.  ;^)
For
> a powerful but simple declaration syntax, look at PL1 or PL/M.

   Or Pascal:

ComplexVar: pointer to array[9] of pointer to array[5] of array[8] of pointer to string;

   Verbose, yes, but it was as simple and clear as I can think it to be.
What I was proposing is this, only using the C++ style:

*[9]*[5][8]*string ComplexVar;

Salutaciones,
                   JCAB
http://www.JCABs-Rumblings.com



February 11, 2002
"Juan Carlos Arevalo Baeza" <jcab@JCABs-Rumblings.com> wrote in message news:a46cqm$22mt$1@digitaldaemon.com...
>    Verbose, yes, but it was as simple and clear as I can think it to be.
> What I was proposing is this, only using the C++ style:
>
> *[9]*[5][8]*string ComplexVar;


Your suggestion is excellent, I'm just not ready to give up the basic type being on the left. Call me an old curmudgeon <g>.


February 11, 2002
> >    Verbose, yes, but it was as simple and clear as I can think it to be.
> > What I was proposing is this, only using the C++ style:
> >
> > *[9]*[5][8]*string ComplexVar;
>
>
> Your suggestion is excellent, I'm just not ready to give up the basic type being on the left. Call me an old curmudgeon <g>.

Than how about my suggestion? ;-D
(Well, maybe it's not the nicest one. But it's quite regular...)

"Basic Type"  [ arrays/pointers hierarchy : Left-to-Right ]  VariableName;

int[3][5] x; // x is an array of 3 arrays of 5 ints
int[3]*[5] x; // x is an array of 3 pointers to arrays of 5 ints
int*[] x; // x is a pointer to an array of ints
int[]* x; // x is an array of pointers to ints



February 11, 2002
"Serge K" <skarebo@programmer.net> wrote in message news:a482jr$2q3a$1@digitaldaemon.com...
> > >    Verbose, yes, but it was as simple and clear as I can think it to
be.
> > > What I was proposing is this, only using the C++ style:
> > >
> > > *[9]*[5][8]*string ComplexVar;
> >
> >
> > Your suggestion is excellent, I'm just not ready to give up the basic
type
> > being on the left. Call me an old curmudgeon <g>.
>
> Than how about my suggestion? ;-D
> (Well, maybe it's not the nicest one. But it's quite regular...)
>
> "Basic Type"  [ arrays/pointers hierarchy : Left-to-Right ]  VariableName;
>
> int[3][5] x; // x is an array of 3 arrays of 5 ints
> int[3]*[5] x; // x is an array of 3 pointers to arrays of 5 ints
> int*[] x; // x is a pointer to an array of ints
> int[]* x; // x is an array of pointers to ints

sorry <g>


February 11, 2002
"Walter" <walter@digitalmars.com> wrote in message news:a47t8g$2mio$1@digitaldaemon.com...

> Your suggestion is excellent, I'm just not ready to give up the basic type being on the left. Call me an old curmudgeon <g>.

I second that =)


1 2 3
Next ›   Last »