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

  1. #procedure template. for implementations only
  2. ## © G. Sawitzki, StatLab Heidelberg 1992 <gs@statlab.uni-heidelberg.de>
  3. #usage: case a
  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. (echo case {1} of∂n∂t':;'∂n∂t'otherwise {case '{1}'}'∂n'end;{case '{1}'}'
  10. )> "{Active}".§     #rewrite selection
  11. find  Δ§ "{Active}"    #move selection to arguments
  12. find /∂:/ "{Active}"
  13. find  Δ§ "{Active}"
  14.  
  15. unset procname
  16.  
  17. exit 0
  18.