>>>>> "PRL" == Perl6 RFC Librarian <[EMAIL PROTECTED]> writes:

  PRL> in a program. However, the following is self-documenting:

  PRL>         $check = ^cylinder_vol == ^radius**2 * ^height
  PRL>           or die ^last_words;

  PRL> This uses the I<named placeholder> notation. If two placeholders use the
  PRL> same identifier, they refer to the same argument. Therefore, the following
  PRL> is equivalent to the previous line:

  PRL>         $check = ^cylinder_vol == ^radius*^radius * ^height
  PRL>           or die ^last_words;

where is pi in that equation? :-)

how are the real params assigned to the named placeholders? in order of
appearance in that expression?

  PRL> First the positional placeholders are filled in (a higher numbered
  PRL> positional placeholder than the number of parameters results in a
  PRL> compile-time error). The anonymous and named placeholders fill in the
  PRL> missing places in the order in which they appear, from left to right.

well you answer that here but it should be mentioned above as well.

uri

-- 
Uri Guttman  ---------  [EMAIL PROTECTED]  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com

Reply via email to