Re: [Plplot-devel] // comments
On 2010-09-15 08:44+0200 Arjen Markus wrote: > Hi Alan, > > I checked this - the MSVC/C++ compiler I am using (reportedly version 15.x > under Visual Studio 2008) does accept // comments. I am sure I > had problems with that before, but they are gone. So, my questioning the > use of // is not important anymore. Thanks, Arjen, for doing this detective work. >From this evidence it looks like we are free to use // style comments for all our C code. My eventual goal is all C comments will use this style (either through a new uncrustify option or a script to enforce this). Alan __ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __ Linux-powered Science __ -- Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] // comments
Hi Alan, I checked this - the MSVC/C++ compiler I am using (reportedly version 15.x under Visual Studio 2008) does accept // comments. I am sure I had problems with that before, but they are gone. So, my questioning the use of // is not important anymore. Regards, Arjen On 2010-09-14 16:37, Alan W. Irwin wrote: > Hi Arjen: > > I have changed the subject line for obvious reasons. > > On 2010-09-14 09:02+0200 Arjen Markus wrote: > >> I have seen in the past that the C++ style of >> comments (//) is not accepted by all C compilers (notably MSVC/C++ 9.0 >> or so, in C mode - there may be a flag to allow that). I will go and >> change these comments to regular C style, if you all agree. > > I think we should positively encourage // style comments in our C > code. The nice thing about // is that it is well-recognized by > everybody reading code and clearly visible (unlike the traditional C > style comments for the multiline case unless you fiddle around with > leading asterisks or other workarounds). > > In the past there were two issues brought up for the // style. > > I. Will it cause compiler issues? It turns out that style is > accepted as part of c99, and when c99 has come up before on this list, > I don't think anybody could find an instance of a C compiler that did > not accept c99. I am not familar with MSVC/C++ 9.0. Does it predate > c99 or otherwise not honour that standard? Anyhow, I would appreciate > you clearing up this doubt by checking whether // causes problems for > that compiler. > > II. Might screw up doxygen style comments. However, it turns out that > doxygen is well aware of the // style, and it is no problem. > > When I discussed these arguments before on list nobody > objected at the time to the // style so I have been using that style > ever since (with no reported compiler issues), and I think it is fine > that Hez is using it as well (so long as there are no popular > compilers that this causes trouble for). > > At some point (assuming there are no compiler issues) I would > like to change all our traditional C style commentary over to the // > style. I have made a request to the uncrustify list on this matter. > If they don't implement a style parameter to that effect, then the job > could be done with a python script. > > Alan > __ > Alan W. Irwin > > Astronomical research affiliation with Department of Physics and Astronomy, > University of Victoria (astrowww.phys.uvic.ca). > > Programming affiliations with the FreeEOS equation-of-state implementation > for stellar interiors (freeeos.sf.net); PLplot scientific plotting software > package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of > Linux Links project (loll.sf.net); and the Linux Brochure Project > (lbproject.sf.net). > __ > > Linux-powered Science > __ > DISCLAIMER: This message is intended exclusively for the addressee(s) and may contain confidential and privileged information. If you are not the intended recipient please notify the sender immediately and destroy this message. Unauthorized use, disclosure or copying of this message is strictly prohibited. The foundation 'Stichting Deltares', which has its seat at Delft, The Netherlands, Commercial Registration Number 41146461, is not liable in any way whatsoever for consequences and/or damages resulting from the improper, incomplete and untimely dispatch, receipt and/or content of this e-mail. -- Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] // comments
Hi Alan, well, this is clearly something I will have to look into. Regards, Arjen On 2010-09-14 16:37, Alan W. Irwin wrote: > Hi Arjen: > > I have changed the subject line for obvious reasons. > > On 2010-09-14 09:02+0200 Arjen Markus wrote: > >> I have seen in the past that the C++ style of >> comments (//) is not accepted by all C compilers (notably MSVC/C++ 9.0 >> or so, in C mode - there may be a flag to allow that). I will go and >> change these comments to regular C style, if you all agree. > > I think we should positively encourage // style comments in our C > code. The nice thing about // is that it is well-recognized by > everybody reading code and clearly visible (unlike the traditional C > style comments for the multiline case unless you fiddle around with > leading asterisks or other workarounds). > > In the past there were two issues brought up for the // style. > > I. Will it cause compiler issues? It turns out that style is > accepted as part of c99, and when c99 has come up before on this list, > I don't think anybody could find an instance of a C compiler that did > not accept c99. I am not familar with MSVC/C++ 9.0. Does it predate > c99 or otherwise not honour that standard? Anyhow, I would appreciate > you clearing up this doubt by checking whether // causes problems for > that compiler. > > II. Might screw up doxygen style comments. However, it turns out that > doxygen is well aware of the // style, and it is no problem. > > When I discussed these arguments before on list nobody > objected at the time to the // style so I have been using that style > ever since (with no reported compiler issues), and I think it is fine > that Hez is using it as well (so long as there are no popular > compilers that this causes trouble for). > > At some point (assuming there are no compiler issues) I would > like to change all our traditional C style commentary over to the // > style. I have made a request to the uncrustify list on this matter. > If they don't implement a style parameter to that effect, then the job > could be done with a python script. > > Alan > __ > Alan W. Irwin > > Astronomical research affiliation with Department of Physics and Astronomy, > University of Victoria (astrowww.phys.uvic.ca). > > Programming affiliations with the FreeEOS equation-of-state implementation > for stellar interiors (freeeos.sf.net); PLplot scientific plotting software > package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of > Linux Links project (loll.sf.net); and the Linux Brochure Project > (lbproject.sf.net). > __ > > Linux-powered Science > __ > DISCLAIMER: This message is intended exclusively for the addressee(s) and may contain confidential and privileged information. If you are not the intended recipient please notify the sender immediately and destroy this message. Unauthorized use, disclosure or copying of this message is strictly prohibited. The foundation 'Stichting Deltares', which has its seat at Delft, The Netherlands, Commercial Registration Number 41146461, is not liable in any way whatsoever for consequences and/or damages resulting from the improper, incomplete and untimely dispatch, receipt and/or content of this e-mail. -- Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel