Am 10.01.2018 um 19:17 schrieb Schaff, Frederik:
>> b.Instead of "varname()" one needs to use
"argname()" to get the name
>> of a series (even when passed by pointer). This could be noted in the
>> gretl help
>
> You mean inside a function, and you want a cross-reference from the help
> for varname() to the help for argname()?
Yes.
This thread is becoming quite complex. Maybe you could enter a short
ticket (bug or feature request, doesn't matter much) for this on the
sourceforge tracker.
Yes, I am aware of it and used it, but it has the same problem. Btw.:
It is not documented that "strings" and "matrices" have the same type
reported as "array" (6)
An "array" in gretl can be 'bundles', 'strings',
'matrices', so this is
correct. One could debate whether this differentiation should be
conveyed, but of course you could always do typeof(myarray[1]) to get
that. (Provided it's not an empty array...)
I even have a bundle inside a bundle, so for checking if
"abndl.bbndl.cstring" exists, I need:
<hansl>
scalar isOK=0 #0==not ok
if exists(abndl)
if inbundle(abndl,bbndl)
isOK = inbundle(abndl.bbndl,cstring)
endif
endif
In principle I agree that some shortcircuiting possibility in the syntax
would be useful. OTOH I would appeal to you to keep it simple. Yes,
hansl has some limitations and is in terms of flexibility not comparable
to Python or some other languages. But typically if you avoid being "too
clever", there is always a straightforward solution, even if it comes at
the cost of some extra lines of code.
(For example, I love Python's short one-liner
"if thisistrue: justdothat"
but I can tolerate the required "endif" in hansl.)
cheers,
sven