RE: [sv-bc] structure literal example in standard

From: Rich, Dave <Dave_Rich_at_.....>
Date: Tue Jan 17 2006 - 10:21:30 PST
It has come back to me. Some functionality has been garbled when '{} was
added to {}.

Before we added the ', only one set of braces in a literal was
represented by a replication. so {4{1}} could become the same as
{1,1,1,1}, the inner set of braces is part of the replication, not part
the assignment pattern.

so {2{1,1}} becomes {1,1,1,1}, it 

Therefore I believe replication in assignment patters should only
require one '

'{4{1,1}}

Dave




> -----Original Message-----
> From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of
> Krishanu Debnath
> Sent: Thursday, January 05, 2006 10:12 PM
> To: sv-bc@eda.org
> Subject: Re: [sv-bc] structure literal example in standard
> 
> Greg Jaxon wrote:
> > Bresticker, Shalom wrote:
> >
> >> Krinshanu Debnath wrote:
> >
> >>> obj = '{a, '{2{b,c}}};
> >>>
> >>> Now if I want to assign value in 1D array obj1, I would extend
> >>> it to ..
> >>>
> >>> obj1 = '{3{'{a, '{2{b,c}}}}};
> >>
> >> Here, you want to do
> >> obj1 = '{3{obj}} ;
> >>
> >> But if you substitute the structure literal for obj, then you omit
the
> >> leading '. You can think of it as moving to precede the {3.
> >
> > Not so.  There are no such magic rules about how replication works.
> >
> > The example on page 12 is wrong, and its expansion has been bungled.
> > Here is a corrected version:
> >
> <snip>
> 
> Thanks Greg, for the confirmation.
> 
> Krishanu
> 
> --
> "/Pedantry/ is just a word used by people who don't care about
accuracy to
>    describe the attitude of those people who do."
> --Richard Heathfield, comp.lang.c
Received on Tue Jan 17 10:21:33 2006

This archive was generated by hypermail 2.1.8 : Tue Jan 17 2006 - 10:21:46 PST