[GRASS-dev] Re: [GRASS-user] Problems with v.outlier and v.lidar.edgedetection

Roberto Antolin roberto at geomatica.como.polimi.it
Fri Nov 17 04:02:08 EST 2006


Hi all,
I allways use this "\" to break a long code line into two or more parts. 
I think that, in this way, the code is more readable. I've never had any 
problem with that and I didn't know it was no neccesary with gcc. But, 
could some body tell me if there are compilation problems with that? In 
that case, I have to clean it.

Regards,
Roberto.

>>C question re that fix:   (vector/lidar/v.outlier/main.c)
>>
>>    /* Structs' declarations */
>>    struct Map_info In, Out, Outlier, Qgis;
>>    struct Option *in_opt, *out_opt, *outlier_opt, *qgis_opt, *passoE_opt, *passoN_opt, \
>>	*lambda_f_opt, *Thres_O_opt;
>>
>>
>>is the end of line "\" harmful or treated like whitespace?
>>    
>>
>
>It's interpreted as string literal concatenation.  In my experience,
>it's useful with strings:
>
>Okay for gcc:
>fprintf(stderr, "blah blah"
>        "more blah blah");
>
>More appropriate:
>fprintf(stderr, "blah blah" \
>        "more blah blah");
>
>I'm sure Glynn has details, but that is my understanding.  I don't know
>if the same issues apply with variable declaration, but it isn't
>necessary at least with gcc.
>
>  
>

-- 
Roberto Antolín Sánchez
Politecnico di Milano - Polo Regionale di Como
(Laboratorio di Geomatica V2.8)
Via Valleggio, 11 - 22100 Como, Italy
tel: +39 031 332 7533 || fax: +39 031 332 7519 
email: roberto.antolin at polimi.it

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-dev/attachments/20061117/069e6f83/attachment.html


More information about the grass-dev mailing list