home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / Pascal / Utilities / Snippets / proc < prev    next >
Encoding:
Text File  |  1992-08-12  |  715 b   |  22 lines  |  [TEXT/MPS ]

  1. #procedure template. for implementations only
  2. #usage: proc name
  3. # © G. Sawitzki, StatLab Heidelberg 1992 <gs@statlab.uni-heidelberg.de>
  4. set a1 "`catenate "{active}".§`"
  5. #set a1 > temp
  6. if "{a1}" == "" #empty selection so far
  7. find ¡1 "{Active}" # get the full current line
  8. end
  9. set procname "{1}"
  10. (echo "∂n"'{----------------------------------------------------------}'
  11. echo '{'∂t"{procname}"∂t'}'∂n∂nprocedure {procname}'(); {* vs 0.1d1 *}'
  12. echo '{'∂t`date -s -d `" ""{procname}":∂t'}'
  13. echo ∂nbegin' {* proc '"{procname}"'*}'∂n∂t∂nend";"' {* proc '"{procname}"'*}'∂n
  14. )> "{Active}".§     #rewrite selection
  15. find  Δ§ "{Active}"    #move selection to arguments
  16. find /∂)/ "{Active}"
  17. find  Δ§ "{Active}"
  18.  
  19. unset procname
  20.  
  21. exit 0
  22.