logo       

Re: menu.lst problem: msg#02311

debian-user-debian

Subject: Re: menu.lst problem

Boyd Stephen Smith Jr. wrote:
> In <20090731124204.GW7828@xxxxxxxxxxxxxxxxxxxx>, Siggy Brentrup wrote:
>> On Fri, Jul 31, 2009 at 16:48 +0800, Timothy Wu wrote:
>>> On Fri, Jul 31, 2009 at 3:53 PM, frank <frank@xxxxxxxxxxxxx> wrote:
>>>> Check out the menu.lst file.
>>> Whoa! I didn't know text hidden in those comments are actually in-use.
<<--deleted-->>
>
> 3. Lines starting with a single '#' are comments in C *unless* the '#' is
> immediately followed by a pre-processor command. This is similar -- you can
> think of update-grub as a GRUB menu.lst pre-processor.

The sharp/hash symbol is a preprocessor indicator. "Pure" C has never
supported anything other than '/*...*/' for comments. C++ added the
single line comment marker '//' (double forward slash).

#include <stdio.h>

# Is this a comment?

main()
{
printf("Hello, world.\n");
}

$ make tstit
cc tstit.c -o tstit
tstit.c:4:3: error: invalid preprocessing directive #Is
make: *** [tstit] Error 1
$

<<--deleted-->>

It is possible to use the preprocessor to do weird and wonderful,
things, so I believe you could even have it ignore lines beginning with
a hash mark, effectively treating them as comments, but that is
definitely not "normal".

--
Bob McGowan

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Google Custom Search

News | Mail Home | sitemap | FAQ | advertise