<html style="direction: ltr;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body bidimailui-charset-is-forced="true" style="direction: ltr;"
text="#000000" bgcolor="#FFFFFF">
You need quotes around the expression:<br>
<br>
<div class="moz-cite-prefix">On 06/09/2018 13:47, Vidura
Dantanarayana wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CANyAw3Afgb0s2SNgqx5fapiguHrhkP4KEPXCVhK8crLrkwedoA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div>Hi all,</div>
<div>I need to create a raster file with theĀ <span
style="color:rgb(255,0,0)">if(fuel_class==4,3,if(fuel_class==8,15))</span>
expression. I used the following command but it result a
parse error. <br>
</div>
<div><br>
</div>
<div>r.mapcalc --overwrite expression=1hr_moisture =
if(fuel_class==4,3,if(fuel_class==8,15))</div>
</div>
</div>
</div>
</blockquote>
r.mapcalc --overwrite expression="1hr_moisture =
if(fuel_class==4,3,if(fuel_class==8,15))"<br>
<br>
Also, what happens if feul_class is not 4 and not 8??<br>
<blockquote type="cite"
cite="mid:CANyAw3Afgb0s2SNgqx5fapiguHrhkP4KEPXCVhK8crLrkwedoA@mail.gmail.com">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div><br>
</div>
<div>What could be the reason for the error?</div>
<div><br>
</div>
<div>BR,</div>
<div>Vidura Dantanarayana. <br>
</div>
<div><br>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
grass-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
+972-523-665918</pre>
</body>
</html>