home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d7xx
/
d770
/
uedit.lha
/
Uedit
/
Jenkins2.LZH
/
Comment
< prev
next >
Wrap
Text File
|
1991-04-08
|
3KB
|
84 lines
====== M2Comment ============================================================
COPYRIGHT 1990
Robert A. Jenkins, Ph.D.
22901 Shagbark Lane
Miller Woods, IL 60411
(708) 758-0344
(708) 759-7063 answering machine
All Rights Reserved
Rick Stiles may distribute it as he pleases.
Thanks for writing and continually improving Uedit!
=============================================================================
In Modula-2 programming we often comment out commands that are used in
debugging. These three commands help to make that easy to do.
The commands to comment and uncomment the next Trace line are useful for me
because I have a Trace module which I use in debugging.
=============================================================================
(*Comment*) cursor line, or next non empty line <shftCtl-8:
while (is(curFile,blankLine)) moveCursor(curFile,downLine)
if (not (is(curFile,sLine))) moveCursor(curFile,sLine)
while (is(curFile,space)) incLoc(curFile,atCursor)
insertRgn(curFile,atCursor, "(*",all)
moveCursor(curFile,eLine)
insertRgn(curFile,atCursor,"*)",all)
putMsg("Added (*__*) on preceeding line")
moveCursor(curFile,downLine)
>Sunday 24-Feb-91 19:30:07
Uncomment cursor line, or following comment line
<shftCtl-0:
if (not (is(curFile,sLine))) moveCursor(curFile,sLine)
decLoc(curfile,atCursor)
setSearch("(\*")
if (search(curFile,sHilite,eHilite,1)) {
..alertUser ("Delete (*__*) on this line?")
clearRgn(curFile,hilite)
setSearch("\*)") }
if (search(curFile,sHilite,eHilite,1)) {
clearRgn(curFile,hilite)
putMsg ("Deleted (*__*) on preceeding line")
moveCursor(curFile,downLine)
refreshDisplay }
>Sunday 24-Feb-91 19:17:50
(*Comment*) next Trace line
<shftCtl-t:
if (not (is(curFile,sLine))) moveCursor(curFile,sLine)
decLoc(curFile,atCursor)
setSearch("Trace")
if (search(curFile,sHilite,eHilite,1))
runKey (shftCtl-8)
putMsg("Added (*__*) on preceeding line")
>Sunday 24-Feb-91 19:26:03
Uncomment next Trace line
<shftCtl-u:
if (not (is(curFile,sLine))) moveCursor(curFile,sLine)
decLoc(curFile,atCursor)
setSearch("Trace")
if (search(curFile,sHilite,eHilite,1))
runKey (shftCtl-0)
putMsg("Deleted (*__*) on preceding line")
>Sunday 24-Feb-91 19:26:03
Comment line
Second Line
Third Line
(*Trace ('Module A");*)
(*Trace ('Module A");*)
Fourth line
(*TraceSTRING('string',string);*)
Comment line
Second Line
Third Line
(*Trace ('Module A");*)
Fourth line
(*TraceSTRING('string',string);*)
Last line