On Tue, 18 Sep 2007, Sven Schreiber wrote:
a nasty because potentially unnoticed bug just bit me with gretl
1.6.5
on a German windows:
Gretl was set to use the German decimal separator (comma) and so I typed
"v2 = v1 / 98,3" in the define-new-variable dialog.
However, gretl effectively seems to have calculated v1/98 without the
fractional part. For example, a value of 98,3 in v1 didn't come out as
1, but as 1,00306.
I know that in scripts one must use the decimal point, but in
dialog windows in a localized setting this is bad behavior IMHO.
I take your point, but the "define a new variable" dialog is
essentially just a window onto a tiny script: the parser is the
same as for "genr" commands in scripts, and allowing the decimal
comma here would break other valid uses of that character (e.g.
as separator for function arguments).
The real bug here is gretl silently truncating rather than
flagging an error. But I can't replicate that. Running currrent
gretl on Linux in German, if I try executing the formula you
quoted, I get an error box:
genr v2 = v1 / 98,
Das Symbol ',' ist ung\"ultig in diesem Kontext.
I don't specifically recall doing anything that would have changed
this behaviour since the 1.6.5 release, but I suppose I must
have done -- there have been several small genr fixes.
Allin.