home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / perl / 7002 < prev    next >
Encoding:
Text File  |  1992-11-17  |  1.6 KB  |  39 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!mcsun!sun4nl!mhres!pronto!news
  3. From: jv@mh.nl (Johan Vromans)
  4. Subject: Re: explicit sub parameters - a proposal
  5. In-Reply-To: mcook@fendahl.dev.cdx.mot.com's message of Thu, 12 Nov 1992 20:30:11 GMT
  6. Message-ID: <BxswLJ.7qF@pronto.mh.nl>
  7. X-Md4-Signature: a5b256844b88b2c9266101d06202f6af
  8. Sender: news@pronto.mh.nl (USEnet News System)
  9. Nntp-Posting-Host: largo:(jv)
  10. Organization: Multihouse Automation, the Netherlands
  11. References: <mcook.721530385@fendahl.dev.cdx.mot.com>
  12.     <1992Nov12.153941.18318@news.eng.convex.com>
  13.     <mcook.721600211@fendahl.dev.cdx.mot.com>
  14. Date: Mon, 16 Nov 1992 08:51:19 GMT
  15. Lines: 22
  16.  
  17. In article <mcook.721600211@fendahl.dev.cdx.mot.com> mcook@fendahl.dev.cdx.mot.com (Michael Cook) writes:
  18.  
  19. >   I've come to learn that &foo(@abc) means &foo($abc[0], ...,
  20. >   $abc[$#abc]).  I'm sure that changing the rules would break a lot
  21. >   of existing code.
  22.  
  23. Only if you supply a function definition that indicates otherwise.
  24. Default behaviour can still be as usual.
  25.  
  26. >   In the definition ``sub foo(@alpha, @beta, $gamma, %delta)'', perl
  27. >   -w should warn about the parameters that follow @alpha, since the
  28. >   declaration doesn't make sense.
  29.  
  30. Of course not! A sub like this one *REQUIRES* two arrays, a scalar and
  31. an associative array. Anything else should be treated like an error.
  32.  
  33.     Johan
  34. --
  35. Johan Vromans                       jv@mh.nl via internet backbones
  36. Multihouse Automatisering bv               uucp:..!{uunet,sun4nl}!mh.nl!jv
  37. Doesburgweg 7, 2803 PL Gouda, The Netherlands  phone/fax: +31 1820 62911/62500
  38. ------------------------ "Arms are made for hugging" -------------------------
  39.