Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HowTo: Multi-line Comments in VFP
Message
From
09/11/2000 15:38:05
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
HowTo: Multi-line Comments in VFP
Miscellaneous
Thread ID:
00439898
Message ID:
00439898
Views:
110
Visual C++ allows multi-line comments using this syntax:
/* This is a
multi-line comment
in Visual C++. */
Unfortunately VFP makes us mark each line as a comment, but you can simulate the Visual C++ style by flipping the leading /* to */ and adding a semi-colon to the end of each line, like this:
*/ This is a ;
multi-line comment ;
in Visual FoxPro. */
The syntax coloring will be off because the editor does not recognize this as a single comment, but it works and you won't get any errors. 

This trick relies on a long-standing behavior of VFP that a comment line that ends with a semi-colon makes a comment out of the next line, too. This can be a "gotcha" sometimes, but works to our advantage here. Of course, the trailing */ is not required but can be added for the sake of completeness. And because it relies on the leading * to make a comment out of the first line, it cannot be used for inline comments.
Rick Borup, MCSD

recursion (rE-kur'-shun) n.
  see recursion.
Next
Reply
Map
View

Click here to load this message in the networking platform