home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / Tools / Preditor 2.0 / Macros / MarkPasFunctions < prev    next >
Encoding:
Text File  |  1991-07-22  |  684 b   |  33 lines  |  [TEXT/TCEd]

  1. #
  2. #  MarkPasFunctions
  3. #
  4. #  Marks all of the Pascal functions in the window "~1" with the 
  5. #  name of the function.  This will produce a list of marks
  6. #  which contain a complete list of functions in the file, from
  7. #  which you can select and immediatly jump to that function
  8. #
  9. # The expected format for a function is:
  10. # <spaces or tabs> "procedure" 
  11. #         OR
  12. # <spaces or tabs> "function"
  13. #
  14.  
  15. searchpat = "^[ \t]*procedure|^[ \t]*function"
  16.  
  17. Select(•,~1)
  18.  
  19. while (Search("p", searchpat, NULL, ~1))
  20.  
  21.     Select([§]≥0, ~1)
  22.     Search("p", "[A-Za-z_][A-Za-z0-9_]*", NULL, ~1)
  23.     
  24.     
  25.     len = Length(Select(§, ~1))
  26.     If (len >= 32)
  27.         Select([§]≤0:[§]≤-30, ~1)
  28.     End
  29.     
  30.     Mark("y", §, Select(§, ~1), ~1)
  31.  
  32.  
  33. End