Re: Pse, help me to understand this code



On 2005-10-30, Keith Thompson <kst-u@xxxxxxx> wrote:
> Jordan Abel <jmabel@xxxxxxxxxx> writes:
>> On 2005-10-28, __frank__ <non.scrivermi@xxxxxxxxxxxxxxxxxxxx> wrote:
>>> /*********************************************/
>>> /*/ DAQmx Configure Code
>>> /*********************************************/
>
> Actually, that's not correct. Of the three lines, the first is a
> valid comment. The leading "/*" on the second line introduces a
> second comment, which is terminated by the trailing "*/" on the third
> line.
>
> It's confusing because there's a "*/" on the second line that doesn't
> close a comment (because the '*' is part of the "/*" that introduces
> it), and a "/*" on the third line that doesn't introduce a comment
> (because it's already within a comment, and comments don't nest).
>
> It's horrible style, requiring too much effort by the reader to
> confirm that it's valid, but it's not actually wrong.
>
> Either of the following would be better:
>
> /*
> * DAQmx Configure Code
> */
>
> or
>
> /*********************************************/
> /* DAQmx Configure Code */
> /*********************************************/

Or the fantabulous:

/*********************************************************/
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* DAQmx Configure Code!!! * * * * * * * * * * * * * * * */
/* * * * DAQmx Configure Code!!! * * * * * * * * * * * * */
/* * * * * * * * DAQmx Configure Code!!! * * * * * * * * */
/* * * * * * * * * * * * DAQmx Configure Code!!! * * * * */
/* * * * * * * * * * * * * ** * *DAQmx Configure Code!!! */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*********************************************************/

But seriously, comment decorations are a waste. They add very
little and are a pain to maintain.

/* DAQmx Configure Code */

--
Neil Cerutti
.



Relevant Pages

  • Re: TENS
    ... new to the groups...and to knowing the reason for the pain all these ... Do people fake being in pain and waste their time posting here? ... learned a lot from reading various threads. ... in the replies to Jamie's posts for that reason. ...
    (alt.med.fibromyalgia)
  • Re: TENS
    ... posts that are ment to screw with people. ... sucks when I am in pain, why cant anyone understand" or some other generaic ... Do people fake being in pain and waste their time posting here? ... > Anyway...I had back surgery a month ago (I think there is a picture of ...
    (alt.med.fibromyalgia)
  • Re: Evolution means people werent planned.
    ... Ashby) wrote: ... ones that care nothing for pain and vast amounts of terrible waste. ...
    (uk.religion.christian)
  • Re: My humblest apologies to men everywhere who cant take a joke.
    ... Sorry to hear that you are feeling such pain and sorrow at this moment, ... I'm just a waste of space waiting to die. ... NOooooooooooooo, you are not a waste of space, i think you are a witty ...
    (uk.people.support.depression)
  • Re: Why Is There a War on Drugs?
    ... I hope you don't mind me answering ... Your pain question is one I do actually wrestle with sometimes when it ... It's such a waste. ... interest can make sense of a senseless act. ...
    (alt.support.chronic-pain)