[GRASS5] I18N for GRASS: continued discussion

Glynn Clements glynn.clements at virgin.net
Fri Nov 15 14:03:26 EST 2002


Helena Mitasova wrote:

> I haven't had time to test the fixes but please make sure that the
> updates for the new r.mapcalc are there, especially that it writes the
> expression into the history file of the newly created raster and that
> it behaves in the same way as the old one in interactive mode (with >
> prompt when a series of expressions is written).
> 
> I know that Glynn has added these modifications

The only changes made to r.mapcalc since the release are:

+ Fix error handling (generate an error message instead of crashing
for undefined maps, variables or functions).

+ Fix the arity of the not() function.

+ Fix the handling of fully-qualified map names.

+ Allow interactive input to be terminated by "end" or "exit" as well
as a blank line or EOF. Add a message to indicate this.

The off-list discussion concluded that evaluating each expression
separately wasn't necessary (doing this for non-interactive use is
undesirable, and supporting separate interactive and non-interactive
evaluation strategies is non-trivial).

Updating the history file probably wouldn't be that hard in itself. 
However, when reading from stdin, the original form of the expression
isn't currently stored anywhere, so you would get e.g. "add(a,mul(b,c))"
instead of "a+b*c". To fix this, I would need to add code to record the
input when reading from stdin.

There's also the issue of the behaviour of the && and || operators
with respect to null values. I.e. whether to implement the behaviour
described in the manpage, e.g.
	
	NULL || true = true
	NULL && false = false

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list