[GRASS-dev] g.parser and zero length parameter

Glynn Clements glynn at gclements.plus.com
Wed Aug 3 14:29:42 EDT 2011


Maris Nartiss wrote:

> db.out.ogr script some months a go got a quotes around file names to
> allow spaces in them. That broke db.out.ogr as in one case it was
> calling v.out.ogr and provided an empty parameter:
> v.out.ogr "$FOO"
> While $FOO was unquoted, unset $FOO wasn't causing problems, still
> after quoting it, parser started to complain about not recognized
> parameter. It's now hacked around in r47390 [1], still I'm wondering
> if parser shouldn't be changed to ignore parameters with 0 length.

An empty first option should be allowed, so that e.g.

	g.message "$message"

works even if $message is empty. I don't see a problem with silently
ignoring subseqent empty arguments:

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list