[GRASS-user] A question before I embark on a programming exercise

Rainer M Krug Rainer at krugs.de
Fri Nov 14 02:21:15 PST 2014


Glynn Clements <glynn at gclements.plus.com> writes:

> Moritz Lennert wrote:
>
>> r.mapcalc down_id = if(dir=1, id[1,1], if(dir=2, id[0,1], if(dir=3, 
>> id[-1,1] .... etc
>
> r.mapcalc follows C expression syntax; "="is assignment, "==" is the
> equality test.

In this case shouldn't it be 

,----
| r.mapcalc down_id = if(dir==1, id[1,1], if(dir==2, id[0,1], if(dir==3, id[-1,1] .... etc
`----

with "==" after the dir?

Rainer

-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 494 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20141114/b1be3185/attachment.pgp>


More information about the grass-user mailing list