From 5230104852a7af729105f2b13f1de78d95c3f9c8 Mon Sep 17 00:00:00 2001 From: anderoonies Date: Fri, 16 Oct 2020 19:19:23 -0400 Subject: [PATCH] documentation for block comments --- src/asm/rgbasm.5 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/asm/rgbasm.5 b/src/asm/rgbasm.5 index b466eb0f..2199db53 100644 --- a/src/asm/rgbasm.5 +++ b/src/asm/rgbasm.5 @@ -47,13 +47,22 @@ The assembler .Em always ignores comments and their contents. .Pp -There are two syntaxes for comments. The most common is that anything that follows a semicolon +There are three syntaxes for comments. The most common is that anything that follows a semicolon .Ql \&; not inside a string, is a comment until the end of the line. -The other is that lines beginning with a +The second is a block comment, beginning with +.Ql /* +and ending with +.Ql */ . +It can be split across multiple lines, or occur in the middle of an expression: +.Bd -literal -offset indent +X = /* the value of x + should be 3 */ 3 +.Ed +The third is that lines beginning with a .Ql * (not even spaces before it) are ignored. -This second syntax is deprecated (will be removed in a future version) and should be replaced with the first one. +This third syntax is deprecated (will be removed in a future version) and should be replaced with either of the first two. .Pp Sometimes lines can be too long and it may be necessary to split them. To do so, put a backslash at the end of the line: