[GRASS5] Re: intersect sites with polygons?

Christoph Simon ciccio at kiosknet.com.br
Thu Jul 4 08:08:56 EDT 2002


On Thu, 4 Jul 2002 08:15:57 +0100
Glynn Clements <glynn.clements at virgin.net> wrote:

> My point was primarily that, so far as possible, whitespace should be
> optional, e.g. "foo - bar" and "foo-bar" should be equivalent, so
> requiring non-alphanumeric map names to be quoted is preferable to
> requiring whitespace around operators.

It can be and in v.mapcalc it is, as long as "-" can't be part of a
name. This is true, as if it is part of the name, quoting is
required. In case of the minus, I think this is the same behaviour as
in r.mapcalc, but I recall that it's different with digits (or it was,
as I didn't see the new r.mapcalc program yet).

> Most of the common programming languages restrict "identifiers" to a
> set of characters which is disjoint from the set of characters used
> for infix operators, so this ambiguity doesn't arise. Consequently,
> requiring whitespace around operators is likely to contradict users'
> experience and habits.

v.mapcalc doesn't really restrict the names to such a subset of
characters. As the mapnames are also filenames, the only restriction
is given by the filesystem. As soon as I implement a suffix notation
to select certain objects of a vmap, this will have to change a
bit. So this ambiguity does arise. Solution is quoting and token
separator where necessary. This behaviour is not very hard to change,
so I suggest waiting until it's done and get a feeling of it.


-- 
Christoph Simon
ciccio at kiosknet.com.br
---
^X^C
q
quit
:q
^C
end
x
exit
ZZ
^D
?
help
.



More information about the grass-dev mailing list