Changeset 9963 for docs/Perl6/FAQ

Show
Ignore:
Timestamp:
04/16/06 07:22:18 (3 years ago)
Author:
gaal
Message:

r10007@sike: roo | 2006-04-16 08:21:25 +0300

  • FAQ::Capture - trivial cosmetic reflow to keep long lines from being eaten on the web rendition.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • docs/Perl6/FAQ/Capture.pod

    r9962 r9963  
    4242  sub make_car ( 
    4343    Str $model, 
    44     Str $color = "black", 
    45     Int $doors = 4 
     44    Str $color? = "black", 
     45    Int $doors  = 4 
    4646  ) { ... } 
    4747 
     
    114114Let's look at some examples: 
    115115 
    116   sub make_car (Int $doors) { say "My car has $doors doors" } 
    117   make_car( doors => 2, doors => 4 ); # 4 doors 
     116  sub make_car (Int $doors) { 
     117    say "My car has $doors doors"; 
     118  } 
     119  make_car( 
     120    doors => 2, doors => 4 
     121  ); # 4 doors 
    118122  
    119   sub board_ark (@animal) { say "@animal.elems() animals boarded the ark" } 
    120   board_ark( animal => "moose", animal => "elephant"); # 2 animals  
     123  sub board_ark (@animal) { 
     124    say "@animal.elems() animals boarded the ark"; 
     125  } 
     126  board_ark( 
     127    animal => "moose", animal => "elephant" 
     128  ); # 2 animals  
    121129 
    122130A Capture object may hold named arguments that occur twice or more.