On Sun, 27 Nov 2011, Sven Schreiber wrote:
On 11/27/2011 06:54 AM, Riccardo (Jack) Lucchetti wrote:
> On Sat, 26 Nov 2011, Allin Cottrell wrote:
>
>> On the principle that what you can do via the gretl GUI you should
>> also be able to do via the gretl command line, here's what is now
>> available in CVS:
>>
>> <hansl>
>> set csv_decimal_comma
>> store teste.csv
>> </hansl>
>>
>> This will save a "CSV" file in which the decimal character is
',' (and
>> the column separator is forced to ';').
>>
>> However, I'm mostly in agreement with those who don't like use of
>> anything other than '.' as the decimal character (except for display
>> purposes) so let me hasten to add:
>>
>> * The default is still to use '.' when saving data, even if the locale
>> decimal character is ',' and the user has elected to use this
>> character in display of gretl output.
>>
>> * The new "set" command illustrated above is unusual in that it is not
>> persistent (this is documented in CVS, not yet in the snapshots). That
>> is, "set csv_decimal_comma" applies only to the next "store"
command.
>> If you want to save several files using the decimal comma you must
>> issue the relevant "set" command each time. In other words, the
>> decimal comma never becomes the default for saving data, even within a
>> gretl script or session.
>
> FWIW, I applaud your decision.
Just one question: if this new 'set' feature isn't persistent, why not
implement it as an option to 'store' instead? Like:
store my.csv --decimal-comma
That way it wouldn't be necessary to do something "unusual" with
'set'.
Hmm, I think you're right. I was too fixated on "set" to
notice that possibility. I'll take another look at this.
Allin