1. Quick Question.
Hi everyone,
Say I have an include file with two functions like this:
global function test1(char test)
int a
a = test2("hi")
return 0
end function
global functin test2(char test)
....
...
return 0
end functin
Now say I call test1("hi") it will give me an error saying test2 is not
defined but it works if test2 is above test1. If I include the file shouldn't
both functions get defined before I even call test1??
Albert
2. Re: Quick Question.
On Wed, 11 Nov 1998 17:24:18 EST, Albert Brauneis <Dajawu36 at AOL.COM> wrote:
>Hi everyone,
>
>Say I have an include file with two functions like this:
>
>global function test1(char test)
>int a
>a = test2("hi")
>return 0
>end function
>
>global functin test2(char test)
>....
>...
>return 0
>end functin
>
>Now say I call test1("hi") it will give me an error saying test2 is not
>defined but it works if test2 is above test1. If I include the file shouldn't
>both functions get defined before I even call test1??
>No. That would be called a "forward reference" and only some
>languages support that, Pascal for example, but not Euphoria.