home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / tcl / 1313 < prev    next >
Encoding:
Text File  |  1992-09-08  |  1.2 KB  |  27 lines

  1. Newsgroups: comp.lang.tcl
  2. Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!menudo.uh.edu!sugar!karl
  3. From: karl@NeoSoft.com (Karl Lehenbauer)
  4. Subject: Re: variable argument procedures.
  5. Organization: NeoSoft Communications Services -- (713) 684-5900
  6. Date: Mon, 07 Sep 1992 17:18:29 GMT
  7. Message-ID: <1992Sep07.171829.19681@NeoSoft.com>
  8. References: <1992Sep1.213654.13684@osf.org> <Btx6Fw.Fs3@cs.psu.edu>
  9. Lines: 16
  10.  
  11. In article <Btx6Fw.Fs3@cs.psu.edu> mchen@groucho.cs.psu.edu (Michael Chen) writes:
  12. >   Sure... try proc foo {args} { puts stdout $args }.
  13. >   Basically, whenever you put args in the parameter list, it takes the values
  14. >in that position in beyond, makes them into a list, and sticks it in args.
  15.  
  16. ...and to amplify this a bit, required arguments can still be specified
  17. explicitly, as in:
  18.  
  19. proc fprintf {fileHandle args} { ... }
  20.  
  21. In the above case, an argument for fileHandle must be present, then
  22. zero or more additional arguments come in as a list through "args".
  23. -- 
  24. -- Email info@NeoSoft.com for info on getting interactive Internet access.
  25. You will now awaken feeling relaxed and refreshed, remembering everything 
  26. you've read except the details of the Omega contingency plan.
  27.