home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Elysian Archive
/
AmigaElysianArchive.iso
/
wp_dtp
/
tked.lha
/
TKEd
/
Rexx
/
Comment-Block.tked
next >
Wrap
Text File
|
1992-07-03
|
2KB
|
58 lines
/**
** ARexx program to comment out a selected block
**
** © Tom Kroener '92
**
**/
options results
address 'TKEd.1' /* Portname of the first started TKEd */
Indent "OFF" /* No unwanted indents */
/* uncomment this for AREXX- or C- programs */
/*
scom = "/** "
mcom = " ** "
ecom = " **/"
*/
/* uncomment this for Modula2- or Oberon- programs */
scom = "(** "
mcom = " ** "
ecom = " **)"
/* uncomment this for Assembler- programs */
/*
scom = ";* "
mcom = ";* "
ecom = ";* "
*/
FirstMarkedLine /* Look for the start of the block */
Start = result
IF Start = -1 THEN
DO; Request1 "No block marked" /* Request and exit if nothing marked */
EXIT 10
END
GetLineNr /* Get number of the last marked line */
End = result-1 /* Cursor stands in the first unmarked
line */
UnmarkBlock
GotoLine Start
BeginOfLine
WriteString scom /* Write start of comment */
DO WHILE Start < END /* Write until end of block */
BeginOfLine
Cursor "DOWN" /* One line down */
WriteString mcom /* Write comment */
Start = Start + 1 /* Increment the counter for the lines */
END;
EndOfLine /* All lines commented out */
MakeReturn /* Insert a blank line for better looking */
WriteString ecom /* Write end of the comment */
EXIT 0 /* ciao */