1. Slice ??

Rob:
  Was I dreaming or is there a abreviated version of slice for removing
  the last index position.

  myseq = myseq[1..length(myseq)-1]

  I remember reading it but I can't find it in documentation .
Bernie

new topic     » topic index » view message » categorize

2. Re: Slice ??

EU>Rob:
EU>  Was I dreaming or is there a abreviated version of slice for removing
EU>  the last index position.

EU>  myseq = myseq[1..length(myseq)-1]

EU>  I remember reading it but I can't find it in documentation .
EU>Bernie
No. There's no abreviated versions of any type of slice.

Jeffrey Fielding
JJProg at cyberbury.net
http://members.tripod.com/~JJProg/

new topic     » goto parent     » topic index » view message » categorize

3. Re: Slice ??

Unfortunaltey, You were dreaming.

end was proposed to be a very help tool OR possibly negative indexes.

myseq = myseq[1..end-1] or  myseq = myseq[1..-1]
I don't support the negative indexing.
It could lead to accidental faulty coding that is difficult to debug.

I do support the idea of either a keyword such as [end] or a symbol
to represent a slice ending.


        Lucius L. Hilley III
        lhilley at cdc.net   lucius at ComputerCafeUSA.com
+----------+--------------+--------------+----------+
| Hollow   | ICQ: 9638898 | AIM: LLHIII  | Computer |
|  Horse   +--------------+--------------+  Cafe'   |
| Software | http://www.cdc.net/~lhilley |  USA     |
+----------+-------+---------------------+----------+
                   | http://www.ComputerCafeUSA.com |
                   +--------------------------------+
----- Original Message -----
From: Bernie Ryan <bwryan at PCOM.NET>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Friday, July 30, 1999 5:36 PM
Subject: Slice ??


> ---------------------- Information from the mail
header -----------------------
> Sender:       Euphoria Programming for MS-DOS
<EUPHORIA at LISTSERV.MUOHIO.EDU>
> Poster:       Bernie Ryan <bwryan at PCOM.NET>
> Subject:      Slice ??
> --------------------------------------------------------------------------
-----
>
> Rob:
>   Was I dreaming or is there a abreviated version of slice for removing
>   the last index position.
>
>   myseq = myseq[1..length(myseq)-1]
>
>   I remember reading it but I can't find it in documentation .
> Bernie
>

new topic     » goto parent     » topic index » view message » categorize

4. Re: Slice ??

Lucius:

   How about this it would probably be easier for Rob to add
   to the interpter.

   myseq = myseq[1..]]  -- chop off the end

Bernie

new topic     » goto parent     » topic index » view message » categorize

5. Re: Slice ??

Yes,  But you can't subtract from that.

        Lucius L. Hilley III
        lhilley at cdc.net   lucius at ComputerCafeUSA.com
+----------+--------------+--------------+----------+
| Hollow   | ICQ: 9638898 | AIM: LLHIII  | Computer |
|  Horse   +--------------+--------------+  Cafe'   |
| Software | http://www.cdc.net/~lhilley |  USA     |
+----------+-------+---------------------+----------+
                   | http://www.ComputerCafeUSA.com |
                   +--------------------------------+
> ---------------------- Information from the mail
header -----------------------
> Poster:       Bernie Ryan <bwryan at PCOM.NET>
> Subject:      Re: Slice ??
> --------------------------------------------------------------------------
-----
>
> Lucius:
>
>    How about this it would probably be easier for Rob to add
>    to the interpter.
>
>    myseq = myseq[1..]]  -- chop off the end
>
> Bernie
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu