home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / historic / v941.tgz / icon.v941src.tar / icon.v941src / ipl / progs / lineseq.icn < prev    next >
Text File  |  2000-07-29  |  962b  |  40 lines

  1. ############################################################################
  2. #
  3. #    File:     lineseq.icn
  4. #
  5. #    Subject:  Program to write a sequence of values on a line
  6. #
  7. #    Author:   Ralph E. Griswold
  8. #
  9. #    Date:     February 18, 1995
  10. #
  11. ############################################################################
  12. #
  13. #   This file is in the public domain.
  14. #
  15. ############################################################################
  16. #
  17. #  This program reads values on separate lines and strings them together
  18. #  on a single line.  The default separator is a blank; other separating
  19. #  strings can be specified by the -s option
  20. #
  21. ############################################################################
  22. #
  23. #  Links:  options
  24. #
  25. ############################################################################
  26.  
  27. link options
  28.  
  29. procedure main(args)
  30.    local opts, sep
  31.  
  32.    opts := options(args, "s:")
  33.    sep := \opts["s"] | " "
  34.  
  35.    every writes(!&input, sep)
  36.  
  37.    write()
  38.  
  39. end
  40.