Re: Interpreter Mod We Can All Get Behind

new topic     » goto parent     » topic index » view thread      » older message » newer message

Jerry Story wrote:
> 
> c.k.lester wrote:
> > 
> > How about block commenting? That would be awesome and could
> > significantly advance the cause for documenting code.
> > 
> > /*
> > Some Topic Header
> > Some topic discussion. Blah blah blah.
> > */
> 
> Suppose you forget the */
Should not be a problem: If the compiler hits <eof> while still looking it
should show eg:
C:\mystuff\test.exw:11
/* Some Topic Header
^ Error: closing block comment not found.

Rather than <eof>: error closing block comment expected, which I agree is
totally useless in comparison.

For this to work, block comments must be nestable, besides sooner or later you
would anyway want to do something like:
/*  <-- added today

procedure x()
  /*  <-- been here months

  Do this
  */
  ...
  /*

  And that
  */
end procedure
*/  <-- added today


<shameless plug>
Of course, Edita handles nested block comments like this no problem smile
</shameless plug>

BTW, Positive supports block comments and also "--/*", "--*/" & "--/**/", (see
PS). However I then found line 30356 in win32lib was "--/* Begin Tone Skoda --"
which it treated as an opening block comment with no matching end. The fix took a
matter of seconds, none of which involved any kind of head scratching. (--/* -->
--!/* forced it to be treated as a line comment).

Regards,
Pete
PS The "--/*" forms are intended to be treated differently by Positive and  RDS
Eu, the latter of which should them as line comments.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu