On Fri, 9 Nov 2012, Allin Cottrell wrote:
On Fri, 9 Nov 2012, Sven Schreiber wrote:
> Am 09.11.2012 18:17, schrieb Allin Cottrell:
>> On Fri, 9 Nov 2012, Sven Schreiber wrote:
>>>
>>> I'm not saying I need it, but it isn't obvious to me why it is less
>>> useful in principle than for example 'isstring()'. Instead it seems
to
>>> be a natural complement to the other 'is...()' functions, doesn't
it?
>>
>> Maybe I was too glib. But actually, it seems to me that all we
>> really need is isnull() --
>
> [followed by more detail]
>
> Hm, not sure, but what about the case of analyzing the components of
> bundles in a script? Maybe the bundle itself is a function argument, and
> then the function needs to check the sanity of the structure of the
> bundle that was passed in?
Point taken. I need to think about that. [...]
Pending more thought, I've just fixed isscalar() in CVS.
But note that this, along with the other cognate is*()
functions, only works for named variables: the argument is a
string and the function returns 1 iff that string is the name
of a variable of the given type (or in the case of isnull, if
the string is _not_ the name of any variable).
A new typeof() function, if we think it's worthwhile, could
perhaps be set up to handle anonymous arguments.
Allin