[GRASS-dev] separator in G7: limit to one character

Vaclav Petras wenzeslaus at gmail.com
Wed Jan 30 23:22:42 PST 2013


Hi,

On 30 January 2013 15:22, Martin Landa <landa.martin at gmail.com> wrote:
> Hi all,
>
> most of modules assume that separator is limited to one character.
> Recently I have added to libgis G_option_to_separator() which gets
> separator character from the option [1]. Some of modules also accepts
> more characters as separator. Maybe it's good time to consolidate it.
> The question is - should be separator limited to one character or not.
> I would say that for horizontal separator one char should be enough.
> In some cases (eg. vertical separator in `db.select`) more characters
> (`char *`) as a separator also make sense. If we limit separator to
> one character, we need to handle such cases separately, eg. by adding
> G_option_to_separator_as_string().
>
> What do you think? Martin

I like multi-character separator. For example, once I generated LaTeX
table with some GRASS command. Even though "&" is sufficient I wanted
nice source, so I used " & ". For row separator (e.g., CRLF on MS
Windows) and for HTML/XML, multi-character separators are always
needed.

Vaclav

>
> [1] http://grass.osgeo.org/programming7/parser_8c.html#ad7e371d6e2ef54f8e739e93de68d651b
>
> --
> Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev


More information about the grass-dev mailing list