On Thu, 5 Jan 2006, Allin Cottrell wrote:
5. So this should be the situation: (a) Regardless of locale, you
should be able to use '.' as decimal separator in genr formulae; (b)
if you use ',' as decimal separator this should be OK too, with the
qualification that you have to make sure to leave a space after an
argument-separating comma in the case of numeric arguments, as in
the pvalue function.
If anyone spots any remaining problems in this area, please let me
know.
Sorry everyone to be a spoilsport, but I am rather against the new setup.
If we allow locale-dependent decimal separators in scripts, then a syntax
like
genr y = 0,5*x
becomes legal. Now imagine the previous line is buried in a 200-line
script. Then, anyone using the script in a "decimal point" locale sees
the script not working. Chances are, they conclude gretl is broken.
For now it's totally hypothetic to assume that anyone would want to run a
gretl script without checking it beforehand, but hopefully he possibility
of setting up a repository of gretl recipes based on scripts is not
unrealistic for the future. In this situation, we CANNOT ask casual users
to scan scripts file in the hunt for commas.
Spreadsheets can OUTPUT figures according to locale, and you can write
formulas according to locale (in fact you have to), but the internal
reprsentation of the formula is unique, so the same, say, xls file
automagically displays commas in Italy and points in the UK. But this
works because the user doesn't have access to the internal representation
of the data.
In the case of script, I see no easy way out of this. The simplest thing
that comes to my mind now is some sort of filter that examines the script
before running it, automatic replacing "decimal commas" (but not
"separator commas") with points. Such a scheme would introduce great
complication and great potential for ambiguity.
OTOH, what do we gain by allowing locale-dependent decimal separators? If
you ask me, very little, too little. But this is open source, right? So,
I'm all for democracy (except whatever Allin decides is OK -- 1st
Marxist sovereign in history). What do others think?
Riccardo `Jack' Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
jack(a)dea.unian.it
http://www.econ.univpm.it/lucchetti