On Thu, 26 Jan 2012, Talha Yalta wrote:
In the plot controls, if I add a line and enter, say, "2,5 +
2,5*x"
gretl automatically converts the commas and draws the line correctly.
It's true that in some GUI contexts (contexts that do not have
a script counterpart) we attempt to recognize the decimal
comma on input, in locales where this applies. It's also true
that this introduces a degree of inconsistency, since, as you
say, the decimal comma is never accepted in a "genr" dialog.
The rigorous way to fix the inconsistency would be to insist
on '.' as the decimal character in _all_ input contexts.
Perhaps we should consider that option.
You suggest that gretl might automatically fix up the decimal
comma in GUI "genr" contexts (meaning that the actual string
passed to genr, and recorded in the command log, would use the
decimal point). That could be done, but only at a basic
heuristic level.
The comma is the argument separator for functions, and also
the row/column separator in matrix-range specifications. To
make sure we don't break user input that's already correct,
we'd have to do something like this:
* Never touch commas that appear between '(' and ')', or
between '[' and ']', in case we're in a function call or a
matrix range.
* Otherwise substitute '.' for ',' if the comma is followed by
a digit.
This to be confined to GUI dialog input (we'd never mess with
scripts or console input) and the case where the output
decimal separator is the comma. I'm not recommending this,
just seeing what people think.
Allin