Hi Guilhem,
Guilhem Bichot, 23.09.2010 19:35:
...
> * When writing single-line comments, the '/*' and '*/" are on the
> same line. For example:
...
> * For a short comment at the end of a line, you may use either /*
> ... */ or a // double slash.
>
> I have always interpreted those rules the following way: this is permitted:
>
> /* blah */
> int x; // blih
>
> but this is fordidden:
> // blah
> int x; // blih
I guess, this is common understanding of the rules. I believe that I did
always adhere to them too. But I always thought that from a strong
interpretation of the two sentences, the second example is not
forbidden. After all, the "// blah" comment is also "at end of a line".
In other words, I was always ready to use such comment when I find that
it makes the code better readable at that place.
However, as mentioned, I believe, I haven't found a place yet, where I
would have wanted to use it. In many cases I try to extend comments so
that they become multi-line, as they stand out better anyway. ;)
Regards
Ingo
--
Ingo Strüwing, Senior Software Developer, ORACLE Deutschland B.V. & Co.
KG, Riesstr. 25, D-80992 München, HRA München 95603, Komplementärin:
ORACLE Deutschland Verwaltung B.V., Rijnzathe 6, 3454PV De Meern,
Niederlande, HR Handelskammer Midden-Niederlande, Nr. 30143697,
Geschäftsführer: Jürgen Kunz, Marcel van de Molen, Alexander van der Ven