On Wed, 10 Nov 2010, Sven Schreiber wrote:
here's a relatively radical suggestion for gretl 2.0, namely to
properly
distinguish statements (=commands) from mere expressions. What do I mean:
Right now, the following
<script>
matrix whatever = zeros(2,2)
whatever
</script>
prints the matrix called 'whatever'.
What bugs me is the line with just the matrix name, why should that
print anything at all, it's not a print command!
Adding To Jack's list of programs that have this behavior: R.
It seems that right now for most objects it doesn't make much of
a
difference whether you write 'print myobject' or just 'myobject', with
the important (unique?) exception of list objects. (Reminder for
non-Allin readers: 'print mylist' prints the contained values of the
member series, whereas 'mylist' prints the *names* of the member series.)
So to get the member names for list objects I would suggest to replace
the syntax 'mylist' with:
'print mylist --membernames'
or somesuch.
I wouldn't want to give up
<unadorned name of user-define object> -> print object
But for people who feel queasy about this -- fair enough, there
probably should be a way to print the membership of a list via the
"print" command, as you suggest.
Allin