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 >
Text File  |  1991-04-08  |  3KB  |  84 lines

  1. ====== M2Comment ============================================================
  2.  
  3. COPYRIGHT 1990
  4. Robert A. Jenkins, Ph.D.
  5. 22901 Shagbark Lane
  6. Miller Woods, IL 60411
  7. (708) 758-0344
  8. (708) 759-7063 answering machine
  9. All Rights Reserved
  10. Rick Stiles may distribute it as he pleases.
  11. Thanks for writing and continually improving Uedit!
  12. =============================================================================
  13. In Modula-2 programming we often comment out commands that are used in
  14. debugging.  These three commands help to make that easy to do.
  15.  
  16. The commands to comment and uncomment the next Trace line are useful for me
  17. because I have a Trace module which I use in debugging.
  18. =============================================================================
  19. (*Comment*) cursor line, or next non empty line <shftCtl-8:
  20.    while (is(curFile,blankLine)) moveCursor(curFile,downLine)
  21.    if (not (is(curFile,sLine))) moveCursor(curFile,sLine)
  22.    while (is(curFile,space)) incLoc(curFile,atCursor)
  23.    insertRgn(curFile,atCursor, "(*",all)
  24.    moveCursor(curFile,eLine)
  25.    insertRgn(curFile,atCursor,"*)",all)
  26.    putMsg("Added (*__*) on preceeding line")
  27.    moveCursor(curFile,downLine)
  28.    >Sunday 24-Feb-91 19:30:07
  29.  
  30. Uncomment cursor line, or following comment line
  31. <shftCtl-0:
  32.    if (not (is(curFile,sLine))) moveCursor(curFile,sLine)
  33.    decLoc(curfile,atCursor)
  34.    setSearch("(\*")
  35.    if (search(curFile,sHilite,eHilite,1)) {
  36.       ..alertUser ("Delete (*__*) on this line?")
  37.       clearRgn(curFile,hilite)
  38.       setSearch("\*)") }
  39.       if (search(curFile,sHilite,eHilite,1)) {
  40.          clearRgn(curFile,hilite)
  41.          putMsg ("Deleted (*__*) on preceeding line")
  42.          moveCursor(curFile,downLine)
  43.          refreshDisplay }
  44.    >Sunday 24-Feb-91 19:17:50
  45.  
  46. (*Comment*) next Trace line
  47. <shftCtl-t:
  48.    if (not (is(curFile,sLine))) moveCursor(curFile,sLine)
  49.    decLoc(curFile,atCursor)
  50.    setSearch("Trace")
  51.    if (search(curFile,sHilite,eHilite,1))
  52.    runKey (shftCtl-8)
  53.    putMsg("Added (*__*) on preceeding line")
  54.    >Sunday 24-Feb-91 19:26:03
  55.  
  56. Uncomment next Trace line
  57. <shftCtl-u:
  58.    if (not (is(curFile,sLine))) moveCursor(curFile,sLine)
  59.    decLoc(curFile,atCursor)
  60.    setSearch("Trace")
  61.    if (search(curFile,sHilite,eHilite,1))
  62.    runKey (shftCtl-0)
  63.    putMsg("Deleted (*__*) on preceding line")
  64.    >Sunday 24-Feb-91 19:26:03
  65.  
  66.  
  67.  
  68.  
  69. Comment line
  70. Second Line
  71. Third Line
  72. (*Trace ('Module A");*)
  73. (*Trace ('Module A");*)
  74. Fourth line
  75. (*TraceSTRING('string',string);*)
  76. Comment line
  77. Second Line
  78. Third Line
  79. (*Trace ('Module A");*)
  80. Fourth line
  81. (*TraceSTRING('string',string);*)
  82. Last line
  83.  
  84.