1. A reeeeaaally small problem
------=_NextPart_000_000E_01BFFFD1.0CF08400
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Well here we go again. I'll be brief:
problem: Expected to see 'end' not a type.=20
or procedure or anything else.
Here's an example of my program:
include get.e
object bob
bob=3Dwait_key()
if bob=3D'1' then
open("g1.ex",r)
end if
=20
Or if I sequence bob it says: Type check failure bob is then it gives me =
the number of the key I pressed.
=20
please to be helping and thanks.
=20
=20
------=_NextPart_000_000E_01BFFFD1.0CF08400
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>Well here we go again. I'll be =
brief:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>problem: <EM>Expected to see 'end' not =
a type.</EM>=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>or procedure or anything =
else.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Here's an example of my =
program:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>include get.e<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><BR>object =
bob<BR>bob=3Dwait_key()<BR>if bob=3D'1'=20
then<BR> open("g1.ex",r)<BR>end if</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Or if I sequence bob it says: <EM>Type =
check=20
failure bob is </EM>then it gives me the number of the key I=20
pressed.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>please to be helping and =
thanks.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV> </DIV>
------=_NextPart_000_000E_01BFFFD1.0CF08400--
2. Re: A reeeeaaally small problem
- Posted by Undetermined origin c/o LISTSERV administrator
Aug 06, 2000
-
Last edited Aug 07, 2000
Paul Kerslake wrote:
> Well here we go again. I'll be brief:
>
> problem: Expected to see 'end' not a type.
> or procedure or anything else.
>
> Here's an example of my program:
>
> include get.e
>
> object bob
> bob=wait_key()
> if bob='1' then
> open("g1.ex",r)
> end if
>
>
> Or if I sequence bob it says: Type check failure bob is then it gives me the
> number of the key I pressed.
>
> please to be helping and thanks.
First, wait_key returns an integer key code, not a sequence.
Second, open is a function. You must use it's return value somehow (i.e. by
assigning it to a variable).
Finally, the second argument to open is a string - here it's assuming that
there's a variable/constant
called r.
Here's a fixed example:
include get.e
integer bob, fn
bob = wait_key()
if bob='1' then
fn = open("g1.ex","r")
end if
Jeffrey Fielding
JJProg at cyberbury.net