Allin Cottrell schrieb:
On Sat, 27 Jan 2007, Sven Schreiber quoted:
>> Why should the GUI user be forced to assign the return, when the script
>> user is free to ignore it?
> Good point!
On the other hand, there may be some packaged functions whose whole
point is to return something, and where it doesn't really make sense to
ignore the return -- perhaps they don't print anything. I guess that is
what you were thinking of. Maybe (perhaps later) we should provide a
way for a function author to indicate whether the return can sensibly be
ignored or not -- some suitable inflection on the "return" statement?
The most intuitive way I guess would be to add a switch to the function
packaging GUI, like "allow user to discard return value", and then gretl
would have to check for an assigned name if discarding is not allowed.
Another possibility would be simply that if no return object name is
specified by the user (the function package caller), gretl uses some
default name, say "result". If the user chooses to ignore it, then it
gets overwritten next time, otherwise the user can copy it to another
object with a different name. (This is similar to the "resid" series in
Eviews, if you know what I mean.)
Or you just leave it as it is...