[Gretl-devel] omit bug
Allin Cottrell
cottrell at wfu.edu
Sat May 24 15:15:39 EDT 2008
On Sat, 24 May 2008, Sven Schreiber wrote:
[ first, about cating 1x1 matrices to scalars, to which I'll reply
later, then... ]
> > > BTW, on various occasions I noticed that arithmetic
> > > expressions cannot always be used in place of simple
> > > variables. But sometimes it does seem to work. Is there some
> > > rule when it should work, or is it sheer luck when it does?
> >
> > In general, arbitrary arithmetic should work for arguments to
> > built-in functions (or user-defined functions for that
> > matter), while it's not very likely to work for arguments to
> > straight "commands".
>
> In principle I think I understand, but I'm not sure the
> demarcation between commands and functions is very clear in
> gretl. What would that 'pvalue' thing be for example?
For the most part the distinction is pretty clear: a function is
something where all the arguments are wrapped in parentheses and
separated by commas, and a command is everything else. But there
are a few hybrid cases, and "pvalue" is one such. Since we have a
perfectly good pvalue function with the same semantics, we
implement the "command" form by composing and executing a call to
"genr"; this gives more flexibility on the form of the arguments.
Allin.
More information about the Gretl-devel
mailing list