A dumb question

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

------=_NextPart_000_0034_01BF8BA2.68F7DB20
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Since the advent of EDS, I am now re-learning what I have forgotten of =
euphoria so I can work on some projects in it. However, I am haing a =
problem:

I have two files, call them file1.ex and file2.e
file1.ex contains 'include file2.e', a procedure, and some startup code =
at the bottom. The startup code runs the procedure, which, amongst other =
things, runs a function in the included file. Something like this:

---file1.ex
include file2.e
procedure getStarted()
    --Do something
    integer functionResult
    functionResult =3D anotherFunction()
    --Do something else
end procedure
getStarted()

--file2.e
function anotherFunction()
    --Do something
end function

When I try to run this code, I get the error: 'anotherFunction has not =
been declared'
Help!

Nick

------=_NextPart_000_0034_01BF8BA2.68F7DB20
        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>Since the advent of EDS, I am now =
re-learning what=20
I have forgotten of euphoria so I can work on some projects in it. =
However, I am=20
haing a problem:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I have two files, call them file1.ex =
and=20
file2.e</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>file1.ex contains 'include file2.e', a =
procedure,=20
and some startup code at the bottom. The startup code runs the =
procedure, which,=20
amongst other things, runs a&nbsp;function in the included file. =
Something like=20
this:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>---file1.ex</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>include file2.e</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>procedure getStarted()</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; --Do =
something</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; integer=20
functionResult</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; functionResult =3D=20
anotherFunction()</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; --Do something =
else</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>end procedure</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>getStarted()</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>--file2.e</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>function anotherFunction()</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; --Do =
something</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>end function</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>When I try to run this code, I get the =
error:=20
</FONT><FONT face=3DArial size=3D2>'anotherFunction has not been=20
declared'</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Help!</FONT></DIV>
<DIV>&nbsp;</DIV>

------=_NextPart_000_0034_01BF8BA2.68F7DB20--

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

Search



Quick Links

User menu

Not signed in.

Misc Menu