rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
* shift
@ 1993-09-22 17:21 Paul Haahr
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Haahr @ 1993-09-22 17:21 UTC (permalink / raw)
  To: rc

biased as i might be, i'd like to point out the existence of es's
solution to the shift question:
        + no shift builtin
        + ... accepted in subscript arguments, where
                $x(m ... n) means all elements of x between the mth
                mth and nth (inclusive).  if m is omitted, 1 is assumed.
                if n is a omitted, $#x is assumed.

anyway, that's it.  while
        * = $*(2 ...)
is not as clean as
        shift
the flexibility is, imho, worth it.



^ permalink raw reply	[flat|nested] 2+ messages in thread
* Re: shift
@ 1993-09-22 18:05 Tom Culliton x2278
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Culliton x2278 @ 1993-09-22 18:05 UTC (permalink / raw)
  To: haahr, rc

>       + ... accepted in subscript arguments, where
>               $x(m ... n) means all elements of x between the mth
>               mth and nth (inclusive).  if m is omitted, 1 is assumed.
>               if n is a omitted, $#x is assumed.

Beautiful!  A really neat idea, but kind of a big change at this stage
in the game, especially if we remove shift too.

Tom


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1993-09-22 18:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1993-09-22 17:21 shift Paul Haahr
1993-09-22 18:05 shift Tom Culliton x2278

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).