Re: in_range()

new topic     » goto parent     » topic index » view thread      » older message » newer message

------=_NextPart_000_002E_01BEB44E.0575AF40
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I like David's idea for this function, but think that Gabriel's type =
idea has merit also.  If the latter approach is used, how about:

global type index_value(sequence x)  --x[1] is the index, x[2] is the =
sequence
    return x[1]>0 and x[1]<length(x[2])
end type

--Mike Nelson

------=_NextPart_000_002E_01BEB44E.0575AF40
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>I like David's idea for this =
function, but think=20
that Gabriel's type idea has merit also.&nbsp; If the latter approach is =
used,=20
how about:</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>global type index_value(sequence =
x)&nbsp; --x[1]=20
is the index, x[2] is the sequence</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>&nbsp;&nbsp;&nbsp; return x[1]&gt;0 =
and=20
x[1]&lt;length(x[2])</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>end type</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>--Mike =

------=_NextPart_000_002E_01BEB44E.0575AF40--

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu