IonicWind Software

Aurora Compiler => General Discussion => Topic started by: Bruce Peaslee on December 27, 2005, 05:12:47 PM

Title: methods need RETURN
Post by: Bruce Peaslee on December 27, 2005, 05:12:47 PM
I don't think I've seen it here, but a warning: forgetting to put a return in your overridden method can cause the program to crash (i.e., just disappear).
Title: Re: methods need RETURN
Post by: Parker on December 27, 2005, 05:34:54 PM
Yes, it's the same as IBasic where a closing brace (ENDSUB) doesn't automatically return, which I think it does in C when a function returns "void" (nothing).
Title: Re: methods need RETURN
Post by: Ionic Wind Support Team on December 27, 2005, 08:44:05 PM
The compiler does give a warning that you've forgotten it.  A method is a subroutine.
Title: Re: methods need RETURN
Post by: Bruce Peaslee on December 27, 2005, 10:43:40 PM
Quote from: Ionic Wizard on December 27, 2005, 08:44:05 PM
The compiler does give a warning that you've forgotten it.ÂÃ,  A method is a subroutine.
It does. My point is that you should heed it.ÂÃ,  ;)
Title: Re: methods need RETURN
Post by: Ionic Wind Support Team on January 05, 2006, 11:34:21 AM
I have changed the parser so it will automatically add the return for functions that don't return a value.  Much like C++ does.

Title: Re: methods need RETURN
Post by: Parker on January 05, 2006, 03:12:31 PM
Yes! No need to put "return;" at the end anymore! Just something that bugged me I guess...
Title: Re: methods need RETURN
Post by: Zen on January 05, 2006, 05:14:44 PM
Hey thats cool. Never thought that would be an optional thing to put if your not returning anything.

Lewis