LoginLogin
Might make SBS readonly: thread

Can't create OUT function with 0 OUT variables

Root / SmileBASIC Bug Reports / [.]

12Me21Created:
DEF TEST X 'works
 PRINT X
END

TEST 3 'works

TEST 7 OUT 'works

DEF TEST2 X OUT 'syntax error
 PRINT X
END

Is this in contradiction to any documentation or specs? EDIT: There's an argument for consistency, that it should be this way: every time a procedure is called, the OUT keyword is always permitted.

Well, looking through the instruction list, it indicates that there are only 3 ways to invoke a user-defined routine, and none of them describes TEST 7 OUT. So, that's the first part settled. As to the second part, a little thought leads to a comparison between "every time a procedure is called, the OUT keyword is always permitted" and "every time a procedure is named (being defined, or being called), the OUT keyword is always permitted". The second is just a whole lot more satisfying, isn't it? I guess the lesson to take away is that 'consistency' is a much stronger argument when applied closer to the basics.