Re: true/false atoms

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

------=_NextPart_000_002C_01BEE4B2.43BFAFA0
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Kat-

What's with the "false" and "true"?  If you want to do what you want to =
do,
just do this...

.
.
.
.
constant DATA_WANT_TO_FIND=3D"blablablablabla"
integer status,fnumber
object data
fnumber=3Dopen("filename","openfor")

while data!=3D-1
data=3Dgets(fnumber)
if sequence(data) then
    data=3Ddata[1..length(data)-1] --clip off the line return.
end if
if equal(data,DATA_WANT_TO_FIND) then
    exit --exit the while...do loop
end if
end while
.
.
.
.

Mike Hurley


------=_NextPart_000_002C_01BEE4B2.43BFAFA0
        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.2314.1000" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Kat-<BR><BR>What's with the "false" and =
"true"?&nbsp; If you=20
want to do what you want to do,<BR>just do=20
this...<BR><BR>.<BR>.<BR>.<BR>.<BR>constant=20
DATA_WANT_TO_FIND=3D"blablablablabla"<BR>integer =
status,fnumber<BR>object=20
<DIV><FONT size=3D2>while data!=3D-1</FONT></DIV>
<DIV><FONT size=3D2>data=3Dgets(fnumber)<BR>if sequence(data)=20
then<BR>&nbsp;&nbsp;&nbsp; data=3Ddata[1..length(data)-1] --clip off the =
line=20
return.<BR>end if<BR>if equal(data,DATA_WANT_TO_FIND) then</FONT></DIV>
<DIV><FONT size=3D2>&nbsp;&nbsp;&nbsp; exit --exit the while...do=20
loop</FONT></DIV>
<DIV><FONT size=3D2>end if<BR>end while<BR>.<BR>.<BR>.<BR>.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>

------=_NextPart_000_002C_01BEE4B2.43BFAFA0--

________________________________________________________
NetZero - We believe in a FREE Internet.  Shouldn't you?
Get your FREE Internet Access and Email at
http://www.netzero.net/download/index.html

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

Search



Quick Links

User menu

Not signed in.

Misc Menu