A r t i c l e s
Pascal Comment Syntax Problems
String:= ' this*)andstuff ' ;
String:= ' this}andstuff ' ;
The above code will be partially commented out, even though the *) is in quotes (in
a string). I noticed this in Lazarus.. the editor does show it as being commented
out, and the FPC compiler says it's commented out too.
I guess the problem occurs mostly when you use a regex like ' text(.*)text ' and you
just happen to be commenting out something before that line.
In Delphi 5 the same issues occur.
If delphi and FPC both have problems with it, it makes me think that maybe this is
not really an issue.
This does not cause any issues:
And neither does this:
TheString:= ' string(*andstuff ' ; *)
Note: This Wiki is outdated, personal views may have changed.
This wiki contains info on life, health, humans, nature, programming, database, fads, paradigms, poems, principles, theories.
Articles may contain statements which some may find helpful and encouraging, or even discouraging.
Beware, I believe in the Grand Justice system.