On Jan 9, 2005, at 9:26 PM, Curtis Cameron wrote:
...I think the compiler warning that really solved the problem was when it found two times in MainFormHandleEvent() when I simply used "return" instead of "return handled". I was surprised to learn that you have to enable all warnings to see something that would be a serious problem in any case. Wouldn't this error pretty much always lead to crashes?

How far back in time do you want to go to understand this problem? :-) C89 supports a bare "return;" in functions that return non-void types; C99 and C++ make this practice illegal. The reason for it being supported at all had to do with the fact that "void" was a relatively late addition to the language, and so functions had to be declared to return something else, like "int" (either explicitly or implicitly). For such functions, a bare "return;" was appropriate.


-- Keith


-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to