Re: Block Comments
- Posted by petelomax May 03, 2010
- 1308 views
Hello,
How do you open and close a block comment?
I think // has something to do with it.
Don Cole
FYI, Phix has both /* and --/* to start a block comment. Like RDS Eu, they can be nested. Technically, they are always closed with */ but --*/ works just as well.
If you are looking for a culprit in win32lib, around line 21261 you can find
--/* Begin Tone Skoda --
which I changed to
--!/* Begin Tone Skoda --
so it is no longer a block comment start, though
--/* Begin Tone Skoda --*/
or
--/* Begin Tone Skoda */--
would fix the problem just as well.
I completely messed up the error handling in 0.5.8, complaining about it at <EOF>, but 0.5.9 and later will show the error on the start line.
I make extensive use of the --/* form to write code which works on both Phix and RDS Eu, eg
--/**/ s = sq_eq(s,' ') --/* Phix s = ( s = ' ' ) -- RDS */
(On Phix, ( s = ' ' ) always yields TRUE or FALSE, and always the latter if s is a sequence; you need to use sq_eq to get the {0,1,0,...} thing. Conversely, of course, RDS Eu does not have a builtin sq_eq routine. While I fully accept that using sq_add() instead of + can produce uglier code in the few places it is needed, there are thousands of times more places where I can use = instead of equal() or >= instead of compare()>=0)
Regards, Pete