automatic line continuation between parentheses official?
by Sven Schreiber
Hi, here's a general question:
For a while now you could, for example, continue your function
definition on the next line without using the explicit continuation
character (backslash). Like this:
function void withmanyargs(int arg1,
int arg2)
...
OK, this also seems to work with other unmatched parentheses (round
brackets) pairs. I've just tested this with an errorif() function
stretched out over two lines, for example.
I don't think this is documented, or is it? Is this official and
reliably a part of the hansl syntax?
I know we're not talking about square brackets or curly braces, just the
round ones.
thanks
sven
2 years, 4 months
search in editor, hiccups revisited
by Sven Schreiber
Hi everybody, I think it has been known that searching in the gretl
script editor sometimes has issues. For example, the locations where
something is found is not always moved into view.
In the past, on the Windows standard version (so using GTK2) it seemed
to me that scrolling the script up or down by just very few, say 1 or 2,
lines would then move the location into view. It was said (I believe)
that this is a GTK bug.
Now I've been using the special GTK3-based version (for Windows,
provided by Allin) for a while, and here I'm seeing more drastic
failures. This has surprised me because I assumed that the bug affected
GTK2 but not GTK3.
A concrete example: I load the file SVAR_plots.inp from the source tree
(under addons/SVAR). Then I search for "splitfname"; gretl correctly
highlights the first occurrence in the first line. OK, easy task. Then I
click on the looking glass icon (or hit return) to continue searching.
Now gretl moves the script view to the lines 95 through 116, and no
search result can be seen. In fact, the second occurrence is in line
219, and when I manually scroll down there, the word is highlighted
alright.
So the viewport adjustment or whatever it's called is seriously broken,
to an extent that it really affects usability IMHO.
What's the story, is that GTK bug only fixed in GTK4, or is it a
Windows-specific bug, or is something else going on?
thanks
sven
2 years, 4 months
crash storing compacted dataset as gdt
by atecon
Hi all,
with latest git the following script crashes with a memory access error
under Ubuntu 21.10:
<hansl>
clear
set verbose off
nulldata 4
setobs 4 2022:01 --time-series
series num = normal()
series str = defarray("A", "B", "C", "D")
dataset compact 1 sum
#store foo.csv # works
#store foo.gdtb # works
store foo.gdt # crashes
<hansl>
The crucial thing is the string-valued series in connection with storing
the dataset as a gdt file.
Best
Artur
2 years, 4 months
garch crash
by Artur T.
Hi,
I just found that negative lag specifications for the garch command lead
to a segmentation fault:
<hansl>
open b-g --quiet
garch -1 0 ; Y
garch 0 -1 ; Y # also crashes
</hansl>
Best,
Artur
2 years, 5 months
func package spec file: inline comment with '#' not allowed in fields like gui-main
by Sven Schreiber
Hi,
it seems that in spec files comments started with '#' sometimes work and
sometimes don't work. For example, this line doesn't cause any problem:
min-version = 2021a # due to _()
but a line like the following does:
gui-main = some_public_func # just this one
Namely, I get an error saying unknown public function. But if I move the
comment to a new line, everything works. Now, I can live with inline
comments not being allowed there, but the error message is misleading
and I'm not sure that the aim is really not to support comments, maybe
this is just a side effect of some bug.
thanks
sven
2 years, 5 months
Missing escape character?
by Ignacio Diaz-Emparanza
I see that if I have a series with an underscore in the name, for
example, "PNB_SPAIN" and I make a graph and pass it to the graph page,
the underscore is interpreted as making a subscript (only for one
character, the S in this example) in the graph page. I guess this is
unintentional and there is probably an escape character missing
somewhere right?
I have seen this in my gretl from current git (Ubuntu 20.04) and some
other (don't konw exactly which gretl version) on windows of a
colleague here.
--
Ignacio Díaz-Emparanza
Departamento de Métodos Cuantitativos
Universidad del País Vasco - Euskalherriko Unibertsitatea, UPV/EHU
Tfno: (+34) 94 601 3732
2 years, 5 months
problem with lag specification with foreach loop in functions
by Sven Schreiber
Hi,
is this supposed to work? It doesn't and instead gives the bogus error
message about the keyword "to":
<hansl>
function void check(list L)
loop foreach i L
ols L.$i const L.$i(-1 to -2) # symbol 'to' not defined
endloop
end function
open denmark
check(deflist(LRM,LRY))
</hansl>
The whole thing works when I work with a copy to a temp series instead,
like this:
series temp = L.$i
ols temp const temp(-1 to -2)
thanks
sven
2 years, 5 months