Post by Stefan on Jan 6, 2021 9:52:58 GMT -5
Hi Robert,
You might be interested in this approach...
I code a lot in REXX where /* ... */ are commonly use for comments, as is the -- prefix construct which doesn't need a closing match.
To improve readability, I tend to start multi-line comments with /** in col 1 and terminate them with **/ in col 1 and place a single * in col 2 for continuation lines.
So a multi-line comment looks like this:
000001 /** Notes:
000002 * - Requires Object REXX interpreter.
000003 * - DEDUP writes a BAT file to rebuild the folder in target folder, but
000004 * rebuild will fail IF master VERSION is altered/deleted from SOURCE folder
000005 **/
The appropriate auto-colorisation from REX.AUTO is provided by COMMENT1,2 & 3, in combination with COMMENT 4:000002 * - Requires Object REXX interpreter.
000003 * - DEDUP writes a BAT file to rebuild the folder in target folder, but
000004 * rebuild will fail IF master VERSION is altered/deleted from SOURCE folder
000005 **/
COMMENT1 12 /** 1 ; /** in col 1 starts a multi-line comment block
COMMENT3 11 * 2 ; * in col 2 continues multi-line comment block
COMMENT2 12 **/ 1 ; **/ in col 1 closes a multi-line comment block (Note */ at the end of any continuation line also closes the comment block)
COMMENT4 11 /* */ ; Standard comment
COMMENT5 4 -- 0 ; Whole line comment
COMMENT5 4 -- 0 ; Whole line comment
COMMENT6 12 :: 1 ; Used for REXX directives
This looks unnecessarily elaborate given that REXX doesn't differentiate between /* and /**, but I figure auto-colorisation is all about readability.
If coded in col 1, /** will give me a scheme 12 (white) 'heading' to the block comment. /** coded in another column will result in a scheme 11 (grey) comment
COMMENT5 to comment out a whole line irrespective of its content. (REXX does not support embedded comments like /* REXX stmt /* comment */ )
COMMENT6 just my lazy way of picking out REXX directives (eg ::REQUIRES, etc) without having to specify individual sub-operands using WORD or AUTOCAPS.