Database development and training for Birmingham and the midlands
Specialists in Microsoft Access and Visual Foxpro database training and development
I am happy to hear from existing clients but I am taking no new calls.
Adding comments in C# or VFP
C#//, /*, */
VFPNote, *, &&
C# Syntax Notes
The // marker can be used at the start of a line or in the middle of a line.
SqlConnection con = new SqlConnection(conString);
con.Open(); // This comment is part of a line
SqlConnection con = new SqlConnection(connectStr);
... and can rem out a block of code. */
The danger with the block style of comment is that any mistake in the closing tag means that all the text until the next correctly-formed closing tag will be accidentally turned into a comment.
VFP Syntax Notes
There are three styles of comment in Visual FoxPro. The * and Note markers are similar. They must be at the start of a line and they mark that entire line as a comment:
* on a line then the entire line is a
Note If 'Note' is the first word on
Note a line then the entire line is a
The Note style dates from dBaseII and is only supported in Visual FoxPro for backwards compatibility. Comments written in this way can be very difficult to understand because you tend to include the word "Note" when you're reading them.
The third style of FoxPro comment uses a double ampersand &&. This can be placed anywhere in a line and marks the start of a comment which runs to the end of the line
USE customer && Open the table
Visual FoxPro does not have a style of comment which will mark a block in a program but you can select several lines of text, right-click, and select *!* to mark the comments so you can easily see which code has been remmed out in this way. The option on the right-click menu will remove the *!* comment marks in the text selected.to indentify them as comments. This tool uses