Events
17 Mar, 21 - 21 Mar, 10
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Used to include explanatory remarks in the source code of a program.
REM comment
' comment
comment
Optional. The text of any comment you want to include. A space is required between the REM
keyword and comment
.
You can put a REM
statement alone on a line, or you can put it on a line following another statement. The REM
statement must be the last statement on the line. If it follows another statement, the REM
must be separated from that statement by a space.
You can use a single quotation mark ('
) instead of REM
. This is true whether your comment follows another statement on the same line or sits alone on a line.
Note
You cannot continue a REM
statement by using a line-continuation sequence (_
). Once a comment begins, the compiler does not examine the characters for special meaning. For a multiple-line comment, use another REM
statement or a comment symbol ('
) on each line.
The following example illustrates the REM
statement, which is used to include explanatory remarks in a program. It also shows the alternative of using the single quotation-mark character ('
) instead of REM
.
Dim demoStr1, demoStr2 As String
demoStr1 = "Hello" REM Comment after a statement using REM.
demoStr2 = "Goodbye" ' Comment after a statement using the ' character.
REM This entire line is a comment.
' This entire line is also a comment.
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Events
17 Mar, 21 - 21 Mar, 10
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register now