by holmes.peterlink.ru (8.12.6/8.12.6) with ESMTP id h8LI253K010630 for <EUforum at topica.com>; Sun, 21 Sep 2003 22:02:05 +0400 (MSD) by stapleton.peterlink.ru (8.12.3/8.12.3) with ESMTP id h8LI18ZU045607 for <EUforum at topica.com>; Sun, 21 Sep 2003 22:01:08 +0400 (MSD) From: Igor Kachan <kinz at peterlink.ru> Subject: Re: A better way then just "$" -- ! ZyYy3gEHAQAAAAAABwAAAAAAZVQTag at boing.topica.com> Hey, Topica, where is this my message at 10:47 msk ???? Hi Al, How about the following proposal: The mark of the sequence end=20 is just '.' or '..' So: s[.] or s[..] is s[length(s)] s[2...] or s[2....] is s[2..length(s)] s[2..2.] or s[2..2..] is s[2..length(s)-2] s[a..b.] or s[a..b..] is s[a..length(s)-b] s[a...b.] or s[a....b..] is s[length(s)-a .. length(s)-b] or s[a.. .. b..] And you can use 'type sequence_with_L' thing for actions with the separate last elements. Cool, no? Regards, Igor Kachan kinz at peterlink.ru ---------- > =EF=D4: Al Getz <Xaxo at aol.com> > =EB=CF=CD=D5: EUforum at topica.com > =F4=C5=CD=C1: RE: A better way then just "$" -- ! > =E4=C1=D4=C1: 21 =D3=C5=CE=D4=D1=C2=D2=D1 2003 =C7. 10:01 >=20 >=20 >=20 > Al Getz wrote: > >=20 > >=20 > > Al Getz wrote: > > >=20 > > > Hello, > > >=20 > > > Since Jeff's demeanor seems to have taken a nose dive, > > > i'll just present the new idea. > > >=20 > > > We have been talking about=20 > > >=20 > > > s=3Ds[1..$-2] > > > and=20 > > > s=3Ds[1..-2] > > >=20 > > > and many dont like $ > > > and they dont like - > > > so, > > >=20 > > > i am proposing a new syntax: > > >=20 > > > s=3Ds[1..$] --as before, $ is length(s) > > > s=3Ds[1..$1] --one from the end --length(s)-1 > > > s=3Ds[1..$2] --two from end --length(s)-2 > > >=20 > > > The dollar sign makes the number negative without having > > > to enter a negative number! > > >=20 > > > It's also shorter then say $-1 too. > > >=20 > > >=20 > > > Take care, > > > Al > >=20 > > Hello again, > >=20 > > To expand on the idea, > >=20 > > s=3Ds[2$..$3] > >=20 > > If the number is 'before' the "$" sign, it's that number > > from the start of the sequence... > >=20 > > s=3D{1,2,3,4,5,6,7} > >=20 > > s=3Ds[2$..$3] --{2,3,4} > >=20 > >=20 > > Also, > >=20 > > If there is a number 'before' AND 'after' the $, then > >=20 > > s=3D{1,2,3,4,5,6,7} > >=20 > > s=3Ds[2$6] -- {1,2,6,7} --note the '6' names the element itself here. > >=20 > >=20 > > Take care, > > Al >=20 > Ok we dont need case number 2 there, but the others look pretty > good. >=20 > Take care, > Al >=20 >=20 >=20 > TOPICA - Start your own email discussion group. FREE! >=20