logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Nice/stdlib/nice/lang array.nice,1.26,1.27: msg#00115

Subject: Nice/stdlib/nice/lang array.nice,1.26,1.27
Update of /cvsroot/nice/Nice/stdlib/nice/lang
In directory sc8-pr-cvs1:/tmp/cvs-serv27909/stdlib/nice/lang

Modified Files:
        array.nice 
Log Message:
Make use of the possibility for a default value to refer to previous params.


Index: array.nice
===================================================================
RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/array.nice,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** array.nice  24 Aug 2003 20:47:57 -0000      1.26
--- array.nice  25 Aug 2003 17:27:10 -0000      1.27
***************
*** 79,89 ****
  }
  
! <Any T> T[] slice(T[] array, int from = 0, int to = -1)
! {
!   if (to == -1) 
!     to = array.length - 1;
! 
!   return fill(new T[to - from + 1], int i => array[i + from]);
! }
  
  // Define collection methods
--- 79,84 ----
  }
  
! <T> T[] slice(T[] array, int from = 0, int to = array.length - 1) =
!   fill(new T[to - from + 1], int i => array[i + from]);
  
  // Define collection methods




-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0


<Prev in Thread] Current Thread [Next in Thread>