Re: error?
- Posted by Don Phillips <EuNexus at yahoo.com> Oct 24, 2002
- 468 views
--0-1993595551-1035513381=:35387 Actuall no, in Euphoria this is a perfectly valid statement. The docs are a wee bit hard to understand on this point, but it works out like this: slice[ # .. (anything greater than #) ] = a sequence slice[ # .. # ] = a sequence length 1 slice[ # .. #-1 ] = a sequence length 0 slice[ # .. (anything less than #-1) ] = error Ok, if decimalcount = 1 (the debug screen says it is 1) then shouldn't this line crash?: resultnum = resultnum[1..decimalcount-1] & "." & resultnum[decimalcount..length(resultnum)] since it is the same as: resultnum[1..0] ? Kat --------------------------------- Do you Yahoo!? Y! Web Hosting - Let the expert host your web site --0-1993595551-1035513381=:35387 Content-Type: text/html; charset=us-ascii <P>Actuall no, in Euphoria this is a perfectly valid statement. The docs are a wee bit hard to understand on this point, but it works out like this: <P>slice[ # .. (anything greater than #) ] = a sequence <P>slice[ # .. # ] = a sequence length 1</P> <P>slice[ # .. #-1 ] = a sequence length 0</P> <P>slice[ # .. (anything less than #-1) ] = error</P> <P> <B><I>Kat <kat at kogeijin.com></I></B> wrote: <BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">============ The Euphoria Mailing List ============ <BR><BR>Ok, if <BR>decimalcount = 1<BR>(the debug screen says it is 1)<BR>then shouldn't this line crash?:<BR><BR>resultnum = resultnum[1..decimalcount-1] & "." & <BR>resultnum[decimalcount..length(resultnum)]<BR><BR>since it is the same as:<BR>resultnum[1..0] <BR>?<BR><BR>Kat<BR><BR>==^================================================================<BR>This email was sent to: EuNexus at yahoo.com<BR><BR>EASY UNSUBSCRIBE click here: http://topica.com/u/?b1dd66.b3deX6.RXVOZXh1<BR>Or send an email to: EUforum-unsubscribe at topica.com<BR><BR>T O P I C A -- Register now to manage your mail!<BR>http://www.topica.com/partner/tag02/register<BR>==^================================================================<BR></BLOCKQUOTE><p><br><hr size=1>Do you Yahoo!?<br> <a href="http://webhosting.yahoo.com/ ">Y! Web Hosting</a> - Let the expert host your web site --0-1993595551-1035513381=:35387--