Re: Unusual EU Problem (must see)
- Posted by Juergen Luethje <j.lue at gmx.de> Aug 14, 2003
- 467 views
Al wrote: <snip> > function FunctionAAA() > atom param > param=1 > return FunctionBBB(param) > end function > > Looks normal, doesnt it? > Well, you would think so anyway...but > > FunctionBBB() never executes! > > Why not? > > procedure FunctionBBB(atom param) > ?param > end procedure <snip> > but no real error comes up as usual in Euphoria. > <<Now why cant that happen with an invalid sequence arg?>> > > Shouldnt there be an error message or something? I get the error message: FunctionBBB has not been declared return FunctionBBB(param) ^ After changing the order of both routines, so that I have ... ----------=----------=----------=----------=--------- procedure FunctionBBB(atom param) ?param end procedure function FunctionAAA() atom param param=1 return FunctionBBB(param) end function ----------=----------=----------=----------=--------- ... I get the error message: Syntax error - expected to see an expression, not a procedure return FunctionBBB(param) ^ as expected. If you meant the following, though (as Pete also supposed) ... ----------=----------=----------=----------=--------- procedure FunctionBBB(atom param) ?param end procedure procedure FunctionAAA() atom param param=1 return FunctionBBB(param) end procedure ----------=----------=----------=----------=--------- ... I get a warning: Unusual EU Problem.exw:8 - statement after return will never be executed So Eu raises a warning, not an error here. Maybe you didn't get the warning, because you used "without warning" in your program? BTW: I tested this, using the Windows interpreter 2.4. <snip> Best regards, Juergen -- /"\ ASCII ribbon campain | "Everything should be made as simple \ / against HTML in | as possible, but not simpler." X e-mail and news, | / \ and unneeded MIME | [Albert Einstein]