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
2. Re: Slice ??
- Posted by JJProg at CYBERBURY.NET
Jul 30, 1999
-
Last edited Jul 31, 1999
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/
3. Re: Slice ??
- Posted by "Lucius L. Hilley III" <lhilley at CDC.NET>
Jul 30, 1999
-
Last edited Jul 31, 1999
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
>
4. Re: Slice ??
- Posted by Bernie Ryan <bwryan at PCOM.NET>
Jul 30, 1999
-
Last edited Jul 31, 1999
Lucius:
How about this it would probably be easier for Rob to add
to the interpter.
myseq = myseq[1..]] -- chop off the end
Bernie
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
>