1. Responce Error

------=_NextPart_000_0007_01C01831.D0788F80
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I'm getting a "sequence lengths are not the same (# !=3D# ) from =
Euphoria. I can't figure out what's wrong.=20

include get.e
include graphics.e
include image.e
sequence trythis
object desc
atom tries
tries=3D5
trythis=3D"Mary had a little lamb."

while  tries>0do
printf(1,"Try typing this: %s\n ", {trythis})
desc=3Dgets(0)
printf(1,"\nTries Left: %d",tries)
if desc=3Dtrythis then
    puts(1,"\nCorrect!")
    elsif desc!=3Dtrythis then
     puts(1,"\nTry Again!")
    tries-=3D1
end if
end while

I know the lengths may be off, but shouldn't it just put the "try again" =
command?
--By the way, does the loop  look right? I'm experimenting with =
different ones.

-Thanks
-Thomas

------=_NextPart_000_0007_01C01831.D0788F80
        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.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I'm getting a "sequence lengths are not =
the same (#=20
!=3D# ) from Euphoria. I can't figure out what's wrong. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>include get.e<BR>include =
graphics.e<BR>include=20
image.e<BR>sequence trythis<BR>object desc<BR>atom=20
tries<BR>tries=3D5<BR>trythis=3D"Mary had a little lamb."</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>while&nbsp; =
tries&gt;0do<BR>printf(1,"Try typing=20
this: %s\n ", {trythis})<BR>desc=3Dgets(0)<BR>printf(1,"\nTries Left:=20
%d",tries)<BR>if desc=3Dtrythis then<BR>&nbsp;&nbsp;&nbsp;=20
puts(1,"\nCorrect!")<BR>&nbsp;&nbsp;&nbsp; elsif desc!=3Dtrythis=20
then<BR>&nbsp;&nbsp;&nbsp;&nbsp; puts(1,"\nTry =
Again!")<BR>&nbsp;&nbsp;&nbsp;=20
tries-=3D1<BR>end if<BR>end while</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I know the lengths may be off, but =
shouldn't it=20
just put the "try again" command?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>--By the way, does the loop&nbsp; look =
right? I'm=20
experimenting with different ones.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>-Thanks</FONT></DIV>

------=_NextPart_000_0007_01C01831.D0788F80--

new topic     » topic index » view message » categorize

2. Re: Responce Error

Paul Kerslake wrote:

> I'm getting a "sequence lengths are not the same
> (# !=# ) from Euphoria. I can't figure out what's wrong.

Use:

   if equal(desc,trythis) then

instead.

-- David Cuny

Who really can't resist saying "See, I told you so" to Robert,
even though his mother taught him better.  blink

new topic     » goto parent     » topic index » view message » categorize

3. Re: Responce Error

Told you so, Robert  blink
-----
cheers,
Derek Parnell
>
>Paul Kerslake wrote:
>
>> I'm getting a "sequence lengths are not the same
>> (# !=# ) from Euphoria. I can't figure out what's wrong.
>
>Use:
>
>   if equal(desc,trythis) then
>
>instead.
>
>-- David Cuny
>
>Who really can't resist saying "See, I told you so" to Robert,
>even though his mother taught him better.  blink
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu