1. serious problem

------=_NextPart_000_0005_01BF9716.E647C0C0
        charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

this program:

include file.e

procedure a12()
 integer fn=20
 fn=3Dopen("C:\\AUTOEXEC.BAT","r")
=20
 sequence s1

end procedure
returns this error:
Syntax error - expected to see possibly 'end', not a type
        sequence s1
                     ^

if i dont use it in procedure, like this:
include file.e

 integer fn=20
 fn=3Dopen("C:\\AUTOEXEC.BAT","r")
=20
 sequence s1

the error is gone.
what's happenin?
try it on your computer and youll see

------=_NextPart_000_0005_01BF9716.E647C0C0
        charset="iso-8859-2"
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-2" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3401" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>this program:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><EM><FONT color=3D#808000 face=3DArial size=3D2>include =
file.e</FONT></EM></DIV>
<DIV>&nbsp;</DIV>
<DIV><EM><FONT color=3D#808000 face=3DArial size=3D2>procedure =
a12()<BR>&nbsp;integer=20
quence=20
s1</FONT></EM></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=3D#808000 face=3DArial size=3D2><EM>end =
procedure</EM></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>returns this error:</FONT></DIV>
<DIV><FONT color=3D#ff0000 face=3DArial size=3D2><STRONG>Syntax error - =
expected to=20
see possibly 'end', not a =
sequence=20
^</STRONG></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>if i dont use it in procedure, like=20
this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><EM><FONT color=3D#808000 face=3DArial size=3D2>include =
file.e</FONT></EM></DIV>
<DIV><EM><FONT color=3D#808000 face=3DArial =
size=3D2></FONT></EM>&nbsp;</DIV>
<DIV><EM><FONT color=3D#808000 face=3DArial size=3D2>&nbsp;integer=20
quence=20
s1</FONT></EM></DIV>
<DIV>&nbsp;</DIV>
<DIV>the error is gone.</DIV>
<DIV>what's happenin?</DIV>
<DIV>try it on your computer and youll =

------=_NextPart_000_0005_01BF9716.E647C0C0--

new topic     » topic index » view message » categorize

2. Re: serious problem

------=_NextPart_000_001F_01BF96C9.54F68C20
        charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

Try this:
include file.e

procedure a12()
 integer fn

 sequence s1


 fn=3Dopen("C:\\AUTOEXEC.BAT","r")
=20
 end procedure
  ----- Original Message -----=20
  From: =A9koda=20
  To: EUPHORIA at LISTSERV.MUOHIO.EDU=20
  Sent: Sunday, March 26, 2000 1:31 AM
  Subject: serious problem


  this program:

  include file.e

  procedure a12()
   integer fn=20
   fn=3Dopen("C:\\AUTOEXEC.BAT","r")
  =20
   sequence s1

  end procedure
  returns this error:
  Syntax error - expected to see possibly 'end', not a type
          sequence s1
                       ^

  if i dont use it in procedure, like this:
  include file.e
  =20
   integer fn=20
   fn=3Dopen("C:\\AUTOEXEC.BAT","r")
  =20
   sequence s1

  the error is gone.
  what's happenin?
  try it on your computer and youll see

------=_NextPart_000_001F_01BF96C9.54F68C20
        charset="iso-8859-2"
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-2" =
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>Try this:</FONT></DIV>
<DIV>
<DIV><EM><FONT color=3D#808000 size=3D2>include file.e</FONT></EM></DIV>
<DIV>&nbsp;</DIV>
<DIV><EM><FONT color=3D#808000 size=3D2>procedure a12()<BR>&nbsp;integer =

fn</FONT></EM></DIV>
<DIV><FONT color=3D#808000></FONT>&nbsp;</DIV>
<DIV><EM><FONT size=3D2>&nbsp;<FONT color=3D#ff0000>sequence =
s1</FONT></FONT>
<DIV>&nbsp;</DIV><BR><FONT color=3D#808000=20
procedure</FONT></EM></DIV></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A href=3D"mailto:tone.skoda at SIOL.NET" =
title=3Dtone.skoda at SIOL.NET>=A9koda</A>=20
</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20
  href=3D"mailto:EUPHORIA at LISTSERV.MUOHIO.EDU"=20
  title=3DEUPHORIA at LISTSERV.MUOHIO.EDU>EUPHORIA at LISTSERV.MUOHIO.EDU</A> =
</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Sunday, March 26, 2000 =
1:31=20
AM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> serious problem</DIV>
  <DIV><BR></DIV>
  <DIV><FONT size=3D2>this program:</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><EM><FONT color=3D#808000 size=3D2>include =
file.e</FONT></EM></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><EM><FONT color=3D#808000 size=3D2>procedure =
a12()<BR>&nbsp;integer=20
  =
quence=20
  s1</FONT></EM></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT color=3D#808000 size=3D2><EM>end =
procedure</EM></FONT></DIV>
  <DIV><FONT size=3D2>returns this error:</FONT></DIV>
  <DIV><FONT color=3D#ff0000 size=3D2><STRONG>Syntax error - expected to =
see=20
  possibly 'end', not a =
  sequence=20
  =
  ^</STRONG></FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT size=3D2>if i dont use it in procedure, like =
this:</FONT></DIV>
  <DIV><FONT size=3D2>
  <DIV><EM><FONT color=3D#808000 size=3D2>include =
file.e</FONT></EM></DIV>
  <DIV><EM><FONT color=3D#808000 size=3D2></FONT></EM>&nbsp;</DIV>
  <DIV><EM><FONT color=3D#808000 size=3D2>&nbsp;integer=20
  =
quence=20
  s1</FONT></EM></DIV>
  <DIV>&nbsp;</DIV>
  <DIV>the error is gone.</DIV>
  <DIV>what's happenin?</DIV>
  <DIV>try it on your computer and youll=20

------=_NextPart_000_001F_01BF96C9.54F68C20--

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

3. Re: serious problem

©koda wrote:

> this program...

In a function and procedure, you need to declare all your variables *before*
any other executable statements. So:

    procedure this()
        integer x, y
        x = 12
        y = 12
    end procedure

is legal, but:

    procedure this()
        integer x
        x = 12
        integer y
        y = 12
    end procedure

is not, because the declaration of 'y' must be placed before any code is
executed. This is also bad:

    procedure this()
        trace(1)
        integer x
        x = 12
    end procedure

for the same reason - all variables must be declared *before* executing the
code.

-- David Cuny

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

Search



Quick Links

User menu

Not signed in.

Misc Menu