Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

typo or normal?



>>>>> "Tony" == Tony Laszlo <laszlo@example.com> writes:

    Tony> Not being a programmer, I can only suspect that the line
    Tony> marked with ">>>>>" has an error in it, namely the ";" being
    Tony> after the "/* FIXME: 1 */" rather than before it. The
    Tony> compiler complained about a "*/" mark being off; could this
    Tony> be it? Thanks.

Comments in C are simply removed (or maybe treated as whitespace, it
doesn't matter here).  I see nothing wrong with this code (as long as
the ">>>>" stuff is _not_ in the file).

More typically the complaint is about something like

  /* i = 1;  /* useful comment */

There's nothing illegal about this (the programmer is commenting out
the assignment).  You could do

  /* i = 1; */ /* useful comment */

to shut up the compiler.  But

  /* i = 1;  /* useful comment */ */

is illegal; C comments do not nest.

-- 
University of Tsukuba                Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences       Tel/fax: +81 (298) 53-5091
_________________  _________________  _________________  _________________
What are those straight lines for?  "XEmacs rules."


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links