Re: in_range()
- Posted by Michael Nelson <mike-nelson-ODAAT at WORLDNET.ATT.NET> Jun 11, 1999
- 382 views
------=_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. If the latter approach is = used,=20 how about:</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV> <DIV><FONT color=3D#000000 size=3D2>global type index_value(sequence = x) --x[1]=20 is the index, x[2] is the sequence</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2> return x[1]>0 = and=20 x[1]<length(x[2])</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2>end type</FONT></DIV> <DIV><FONT color=3D#000000 size=3D2></FONT> </DIV> <DIV><FONT color=3D#000000 size=3D2>--Mike = ------=_NextPart_000_002E_01BEB44E.0575AF40--