[GRASS-dev] Does g.parser accept 2-byte flags?

Vaclav Petras wenzeslaus at gmail.com
Sun Nov 3 12:53:09 PST 2013


Hi Nikos,

On Sun, Nov 3, 2013 at 11:19 AM, Nikos Alexandris
<nik at nikosalexandris.net>wrote:

> Is it possible to define a series of flags -cl -ch -mi -ma for a bash shell
> grass script, that g.parser will understand?
>
> Is it "recommended" to use only 1-byte characters as flags?
>
> I don't think so. But maybe the option with type string and options
defined would be what you can use?

Citing from r.in.wms script:
#%option
#% key: driver
#% type:string
#% description: Driver used to communication with server
#% descriptions: WMS_GDAL;Download data using GDAL WMS
driver;WMS_GRASS;Download data using native GRASS-WMS
driver;WMTS_GRASS;Download data using native GRASS-WMTS
driver;OnEarth_GRASS;Download data using native GRASS-OnEarth driver;
#% options:WMS_GDAL, WMS_GRASS, WMTS_GRASS, OnEarth_GRASS
#% answer:WMS_GRASS
#% guisection: Connection
#%end

It could be more clearer than flags.

If g.parser supports that, there is a lot of bugs in GRASS... However, the
documentation shows that Flag structure key attribute is only char (so one
ascii character/byte):

http://grass.osgeo.org/programming7/structFlag.html

Try to define two byte flag, maybe it even triggers an error message.

Vaclav

Thank you, Nikos
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20131103/95d8eca1/attachment.html>


More information about the grass-dev mailing list