Re: RE: atoms, grrrrrr

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

--------------Boundary-00=_5SW4QL80000000000000


--------------Boundary-00=_5SW4LVC0000000000000
  charset="iso-8859-1"

sequence s1
integer at1
at1 =3D 3
s1 =3D {"the","cat","ate","big","dinner"}
? length(s1)
if at1 < length( s1 ) then
    puts(1,"it works!")
end if

This worked for me.

Hope this help,
    Guillermo Bonveh=ED
    AKA: Caballero Rojo - Red Knight - Knixeur

-------Original Message-------


From: Kat=20
To: EUforum=20
Subject: RE: atoms, grrrrrr

On 21 Feb 2001, at 14:00, Brian Broker wrote:

> Kat,
>=20
> What I usually do in a case like this is either trace it or just put th=
e=20
> following before the test:
>=20
> ? at1

3

> ? s1

s1 is a nested sequence, which is what it should be, so it won't ?"", but=
 ex.err and the=20
tracer window says it is:
s1 =3D {{116't',104'h',101'e'},{99'c',97'a',116't'},{97'a',116't',101'e'}=
,
which is correct, as it should be.

? length(s1)
will print out: 3

then=20
if at1 < length( s1 )
crashes.

Robert, might i have a bad version of exw.exe? I seem to be the only one =
having these=20
odd problems.

Kat

PS!!!!!!!
AAARRRRRRRGGGGGGG
the ex.err was reporting the wrong line, see where i changed put in equal=
() below=20
<sigh>:

if at1 < length( s1 )
   and at2 < length( s2 )
   and equal(s1[at1] , s2[at2+1])
   and equal(s1[at1+1] , s2[at2]) then
        left &=3D s1[at1..at1+1]
        right &=3D s2[at2..at2+1]
        at1 +=3D 1
        at2 +=3D 1
         exit
 end if



--------------Boundary-00=_5SW4LVC0000000000000


--------------Boundary-00=_5SW4G6G0000000000000
  charset="iso-8859-1"

<html>
<head>
<meta name=3D"GENERATOR" content=3D"IncrediMail 1.0">
</head>

<BODY background=3D"" bgColor=3D#ffffff style=3D"BACKGROUND-POSITION: 0px=
 0px; FONT-FAMILY: Arial" scroll=3Dyes ORGYPOS=3D"0">
<TABLE border=3D0 cellPadding=3D2 cellSpacing=3D0 id=3DINCREDIMAINTABLE w=
idth=3D"100%">
<TBODY>
<TR>
<TD id=3DINCREDIHEADER width=3D"100%"></TD>
</TR>
<TR>
<TD id=3DINCREDITEXTREGION width=3D"100%">
      <DIV>sequence s1<BR>integer at1</DIV>
      <DIV>at1 =3D 3</DIV>
      <DIV>s1 =3D {"the","cat","ate","big","dinner"}</DIV>
      <DIV>? length(s1)</DIV>
      <DIV>if at1 &lt; length( s1 ) then<BR>&nbsp;&nbsp;&nbsp; puts(1,"it=
=20
      works!")<BR>end if</DIV>
      <DIV>&nbsp;</DIV>
      <DIV>This worked for me.</DIV>
      <DIV>&nbsp;</DIV>
      <DIV>Hope this help,</DIV>
      <DIV>&nbsp;&nbsp;&nbsp; Guillermo Bonveh=ED</DIV>
      <DIV>&nbsp;&nbsp;&nbsp; AKA: Caballero Rojo - Red Knight - Knixeur<=
/DIV>
      <DIV>&nbsp;</DIV>
      <DIV><I>-------Original Message-------</I></DIV>
      <DIV>&nbsp;</DIV>
      <DIV>&nbsp;</DIV>
      <DIV dir=3Dltr id=3Dfromshowfield><U><I>From:</I></U><B> Kat=20
      <GERTIE at PELL.NET></B></DIV>
      <DIV dir=3Dltr id=3Dtoshowfield><U><I>To:</I></U><B> EUforum=20
      <EUFORUM at TOPICA.COM></B></DIV>
      <DIV dir=3Dltr id=3Dsubjectshowfield><U><I>Subject:</I></U><B> RE: =
atoms,=20
      grrrrrr</B></DIV><BR>On 21 Feb 2001, at 14:00, Brian Broker=20
      wrote:<BR><BR>&gt; Kat,<BR>&gt; <BR>&gt; What I usually do in a cas=
e like=20
      this is either trace it or just put the <BR>&gt; following before t=
he=20
      test:<BR>&gt; <BR>&gt; ? at1<BR><BR>3<BR><BR>&gt; ? s1<BR><BR>s1 is=
 a=20
      nested sequence, which is what it should be, so it won't ?"", but e=
x.err=20
      and the <BR>tracer window says it is:<BR>s1 =3D=20
      {{116't',104'h',101'e'},{99'c',97'a',116't'},{97'a',116't',101'e'},=
>which=20
      is correct, as it should be.<BR><BR>? length(s1)<BR>will print out:=
=20
      3<BR><BR>then <BR>if at1 &lt; length( s1 )<BR>crashes.<BR><BR>Rober=
t,=20
      might i have a bad version of exw.exe? I seem to be the only one ha=
ving=20
      these <BR>odd=20
      problems.<BR><BR>Kat<BR><BR>PS!!!!!!!<BR>AAARRRRRRRGGGGGGG<BR>the e=
x.err=20
      was reporting the wrong line, see where i changed put in equal() be=
low=20
      <BR>&lt;sigh&gt;:<BR><BR>if at1 &lt; length( s1 )<BR>&nbsp;&nbsp; a=
nd at2=20
      &lt; length( s2 )<BR>&nbsp;&nbsp; and equal(s1[at1] ,=20
      s2[at2+1])<BR>&nbsp;&nbsp; and equal(s1[at1+1] , s2[at2])=20
      then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; left &amp;=3D=20
      s1[at1..at1+1]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; right =
&amp;=3D=20
      s2[at2..at2+1]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at1 +=3D=
=20
      1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at2 +=3D=20
      1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit<BR>&nbsp=
;end=20
      Discussions on Topics You=20
      Choose.<BR>http://www.topica.com/partner/tag01<BR></TD>
</TR>
<TR>
<TD id=3DINCREDIFOOTER width=3D"100%">
=09<TABLE cellPadding=3D0 cellSpacing=3D0 width=3D"100%">
=09<TBODY>
=09<TR>
=09<TD width=3D"100%"></TD>
=09<TD align=3Dmiddle id=3DINCREDISOUND vAlign=3Dbottom></TD>
=09<TD align=3Dmiddle id=3DINCREDIANIM vAlign=3Dbottom></TD>
=09</TR>
=09</TBODY>
=09</TABLE>
</TD>
</TR>
</TBODY>
</TABLE><SPAN=20
id=3DIncrediStamp>
<P align=3Dleft><FONT face=3D"Arial, Helvetica, sans-serif"=20
evolved</B> - </FONT><A href=3D"http://www.incredimail.com/imstamp26.html=
"><FONT=20
face=3D"Times New Roman" size=3D3><B><U>Click=20
Here</U></B></FONT></A></P></SPAN></FONT>
</html>
--------------Boundary-00=_5SW4G6G0000000000000--

--------------Boundary-00=_5SW4LVC0000000000000--

--------------Boundary-00=_5SW4QL80000000000000--

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

Search



Quick Links

User menu

Not signed in.

Misc Menu