[GRASS5] An error in v.surf.idw main program --- may be a bug.

Wolf Bergenheim wolf+grass at bergenheim.net
Fri Dec 30 15:11:47 EST 2005


Hi Muzaffer,

The statement "if ( dist = list[n].dist )" is correct. it should perhaps
be re-written to "if ( list[n].dist == 0.0 )" and then assignd "dist =
list[n].dist;" in the if-block (or use "list[n].dist" as the divisor),
to make it explicit what we are doing. if dist is zero then the distance
to one of the sites is zero, and we simply use the site value instead.

--Wolf

-- 

<:3 )---- Wolf Bergenheim ----( 8:>

On 30/12/05 19:53, Muzaffer Ayvaz wrote:
> Hi all;
>    
>   While i am compiling the grass source codes gcc shows a warning. for the line
>    
>   .....
>     /* interpolate */
>   sum1 = 0.0;
>   sum2 = 0.0;
>   for (n = 0; n < nsearch; n++)
>   {
>   if(dist = list[n].dist)
>   {
>   
> 
>    
>   The code is like that in both 6.0.1 version and 6.0.2RC1.
>   is it an error or anythig else. i think it must be;
>    
>     if ( dist == list[n].dist)
>    
>   Best regards...
>   Muzaffer
>    




More information about the grass-dev mailing list