[GRASS-dev] [grass.script.core] parser() casts options as strings
Glynn Clements
glynn at gclements.plus.com
Thu Aug 6 11:26:50 EDT 2009
Glynn Clements wrote:
> > >> In this regard also check given value
> > >> by the parser. Then the parser could print a warning when the user
> > >> enter option value which cannot be casted to the given data type (e.g.
> > >> string for integer option).
> > >
> > > It already does this; see check_an_opt() in parser.c.
> >
> > right, I meant e.g.
> >
> > v.info bus layer=x
> >
> > should print at least warning that 'x' is not valid integer value.
>
> I misread the code; it's only used if opt->options is present.
>
> I'll look into this.
In r38629, options are checked regardless of whether opt->options is present.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list