At Tue, 27 Sep 2005 14:12:54 +1000, Erik de Castro Lopo wrote:
>     let integer_array = [| 1 ; -2 ; 3 ; -4 ; 5 ; -6 ;
>         -7 ; 8 ; -9 ; 32727000 |] ;;
> 
>     Array.mapi (fun i x
>         -> Printf.printf "integer_array[%d] = %d\n" i x
>         ) integer_array ;;

Hey, my first actual perl6 program:

 #!/usr/bin/pugs
 use v6;

 my @integer_array = <1 -2 3 -4 5 -6 -7 8 -9 32727000>;

 for 0 .. @integer_array - 1 {
   say "integer_array[$_] = @integer_array[$_]";
 }


-- 
 - Gus
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to