On Tue, 14 Apr 2015, oleg_komashko(a)ukr.net wrote:
> Do you really mean "crashes"
In my version gretl crashes, i.e. aborts
I'm not sure how that was happening but it should be fixed in CVS
(snapshots will follow tomorrow)
I need to assign some default value to a function argument of
strings type . Is there any way to do it? For string type it is
simply vname[null]. But for strings type I get "syntax error".
Maybe that should be allowed for arrays. But a null default is
already acceptable for a "pointer to" an array. For example:
<hansl>
function void arraytest (strings *S[null])
if isnull(S)
print "S is null"
else
print S
endif
end function
strings S = array(2)
S[1] = "foo"
S[2] = "bar"
arraytest()
arraytest(null)
arraytest(&S)
</hansl>
Allin
--- Оригінальне повідомлення ---
Від кого: "Allin Cottrell" <cottrell(a)wfu.edu>
Дата: 14 квітня 2015, 02:48:14
On Tue, 14 Apr 2015, oleg_komashko(a)ukr.net wrote:
> Gretl 1.10.90 on debian crashes in attempting to reproduce
> example on p. 77 of User's Guide (dated March 15) creating empty
> array
>
> matrices M = null
Do you really mean "crashes", or that an error message is generated?
I'm seeing the latter. That shouldn't be, and will be fixed, but in
the meantime you can use
matrices M = array(0)
to the same effect (get an empty array).