[GRASS-dev] [grass-code R][289] Ignore line with syntax error in r.mapcalc

code R item #289, was opened at 2007-02-13 11:02
Status: Open
Priority: 3
Submitted By: Māris Nartišs (marisn)
Assigned to: Nobody (None)
Summary: Ignore line with syntax error in r.mapcalc
Issue status: None
GRASS component: raster
Operating system: Linux
Operating system version:

Initial Comment:
Currently if user makes mistake in r.mapcalc, whole r.mapcalc work session is ruined and r.mapcalc does not warn user about this. It would be nice, if r.mapcalc would ignore bogous lines entered by user and print about it warning message. r.mapcalc should fail completely on bug or provide way to fix problem but not leave user in middle - with fake sense, that it will accept corrected expression.

Below is simple work session, that can drive nuts any r.mapcalc user.
GRASS 6.3.cvs (spearfish60):~ > r.mapcalc
Enter expressions, "end" when done.
mapcalc> delete=if()
Too few arguments (0) to function if()
mapcalc> delete=if(1)
syntax error, unexpected VARNAME, expecting $end
Parse error

GRASS 6.3.cvs (spearfish60):~ >

----------------------------------------------------------------------

You can respond by visiting:
http://wald.intevation.org/tracker/?func=detail&atid=188&aid=289&group_id=21