This one bit me today

Norman Diamond diamond at csl.sony.co.jp
Wed Oct 25 20:31:09 AEST 1989


In article <41063 at bu-cs.BU.EDU> austin at bucsf.bu.edu (Austin Ziegler) writes:

>     Every pascal compiler I have seen accepts both '{' and '(*' as
>characters which start comments.

Yes.  The standard requires it too.

>That means you could have a { (* *) }
>comment or a (* { } *) comment.

No.  {            (*                 *)                 }
   start    part of comment     end of comment      syntax error

    (*            {                  }                  *)
   start    part of comment     end of comment      syntax error

>Beyond that,

and including that,

>Pascal DOES NOT NEST.  Even
>though they are two different sets of characters, they both delimit
>comments.

Exactly.

-- 
Norman Diamond, Sony Corp. (diamond%ws.sony.junet at uunet.uu.net seems to work)
  Should the preceding opinions be caught or     |  James Bond asked his
  killed, the sender will disavow all knowledge  |  ATT rep for a source
  of their activities or whereabouts.            |  licence to "kill".



More information about the Comp.lang.c mailing list