develooper Front page | perl.perl5.porters | Postings from September 1999

Re: [PATCH 5.005_61] Enable comments in pack()/unpack() templates

Thread Previous | Thread Next
From:
Ilya Zakharevich
Date:
September 23, 1999 01:34
Subject:
Re: [PATCH 5.005_61] Enable comments in pack()/unpack() templates
Message ID:
199909230834.EAA02528@monk.mps.ohio-state.edu
Tim Bunce writes:
> > >from '#' to '%'.  Fortunately, '%' is already occupied, which lead me
> > >to think about '/'.  This leads to very readable path-like groups.
> 
> > > +    unpack 'C/a', "\04Gurusamy";        gives 'Guru'
> 
> I'm not so sure:
> 
> 	"C/aC/aC/a"
> 
> seems to group the 'a' with the following 'C' - which isn't right.

So do not use it!  ;-)

Use "C/a C/a C/a".  Isee no difference with the previous "C#aC#aC#a",
btw,

> For regex we use:
> 
> 	.{4}
> 
> for repeat counts, perhaps for pack/unpack we could use:
> 
> 	{C}a

When I proposed it a month ago, there were some objections.  Do not
remember it now.  Btw, then a/a*/a* will become {{a}a}a.  More
readable, but possibly harder to parse.

Ilya

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About