match use

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

This is a multi-part message in MIME format.

------=_NextPart_000_0009_01C1FB7D.60B2D120
	charset="iso-8859-1"


I am having a problem with match.  location is to hold the starting =
position of  Name is the string of data. I want to then pick the Name =
and to he data following for value of Name. My illustration doesn't =
work. Is the result location "Name" a number value?=20
I want to put the value of name back into data. I have described =
location as an atom,


function InsertCRLFs(sequence data)
atom location
sequence  dat dat =3D {}

 location =3D match("Name", data)
-- location is set to 3

 =20
dat =3D getText(data[location..3])
 return dat
end function

------=_NextPart_000_0009_01C1FB7D.60B2D120
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2722.2800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I am having a problem with match.&nbsp; =
location is=20
to hold the starting position of&nbsp; Name is the string of data. I =
want to=20
then pick the Name and to he data following for value of Name. My =
illustration=20
doesn't work. Is the result location "Name" a number value? =
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I want to put the value of name back =
into data. I=20
have described location as an atom,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>function InsertCRLFs(sequence =
data)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>atom location<BR>sequence&nbsp; dat dat =
=3D=20
{}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;location =3D match("Name", =
data)<BR>-- location=20
is set to 3</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;<FONT face=3DArial=20
size=3D2>&nbsp;<BR></FONT></FONT><FONT face=3DArial size=3D2>dat =3D=20
getText(data[location..3])<BR>&nbsp;return dat<BR>end=20

------=_NextPart_000_0009_01C1FB7D.60B2D120--

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

Search



Quick Links

User menu

Not signed in.

Misc Menu