©
serviceprofessionalgmbh
Das Makro fügt eine Kommentarbox ein. Die linke, obere Ecke der Box wird durch den Cursor bestimmt.
/* REXX * EDIT MACRO *************************************************/
/* */
/* Macroname.: BOX */
/* Zweck.....: Erzeugt Kommentarbox in der Cursorzeile in der Hoehe */
/* der angegebenen Zeilen (Standard = 1) */
/* */
address isredit
"macro (boxlines)"
if datatype(boxlines)="CHAR" then boxlines=1
"(csr,col) = CURSOR"
if CSR = 0 ! COL = 0 then do
ZEDSMSG = "Cursor nicht im Text"
ZEDLMSG = "Um eine Kommentarbox zu erzeugen, muá der CURSOR im" ,
"Quellcode stehen"
address ispexec "setmsg msg(ISRZ000)"
exit
end
breite=72
l.3=left("/",breite-COL,"*")
l.2="*"copies(" ",breite-COL-2)"*"
l.1=right("/",breite-COL,"*")
do cnt = 1 to 3
if cnt=2 then loops = boxlines
else loops=1
do loops
"line_after .zcsr = '"copies(" ",COL-1) !! l.cnt"'"
end
end
csr = csr + 2
col = col + 2
"CURSOR = (csr,col)"
exit
zurück zu Edit Makros