Re: Pse, help me to understand this code
- From: Jordan Abel <jmabel@xxxxxxxxxx>
- Date: Sun, 30 Oct 2005 10:51:55 +0000 (UTC)
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
>>> /*********************************************/
>>
>> What is this? You do realize that if you did a multiline comment in
>> this style every second line wouldn't be commented, right?
>
> 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).
That's what i was trying to say - _this_ happens to be a valid
comment (well, two comments) but if he tried to do
/******/ /*/ 1 /*/ 2 /*/ 3 /*/ 4 /******/
it would become
/*....*/ /*.....*/ 2 /*.....*/ 4 /*....*/
and
/******/ /*/ 1 /*/ 2 /*/ 3 /******/
becomes
/*....*/ /*.....*/ 2 /*..........*/
> It's horrible style, requiring too much effort by the reader to
> confirm that it's valid, but it's not actually wrong.
.
- References:
- Re: Pse, help me to understand this code
- From: Jordan Abel
- Re: Pse, help me to understand this code
- Prev by Date: Re: The result of 1 << 32
- Next by Date: Re: The result of 1 << 32
- Previous by thread: Re: Pse, help me to understand this code
- Next by thread: Re: Pse, help me to understand this code
- Index(es):
Relevant Pages
|