Wiki

Changes between Version 2 and Version 3 of StreamType

Show
Ignore:
Timestamp:
02/02/09 05:13:31 (15 years ago)
Author:
Chuck
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • StreamType

    v2 v3  
    33class Example 
    44 
    5    def main is shared 
    6       pass 
     5    def main is shared 
     6       pass 
    77 
    8    def bill(customers as Customer*) 
    9       for c in customers 
    10          c.billIfNeeded 
     8    def bill(customers as Customer*) 
     9        for c in customers 
     10            c.billIfNeeded 
    1111 
    12    def foo(ints as int*) 
    13       t = for i in ints where i > 0 
    14       print t 
     12    def foo(ints as int*) 
     13        t = for i in ints where i > 0 
     14        print t 
    1515 
    16    def bar(ints as int*) 
    17       t = List<of int>(t) 
    18       t.sort 
    19       t.reverse 
    20       print t 
     16    def bar(ints as int*) 
     17        t = List<of int>(t) 
     18        t.sort 
     19        t.reverse 
     20        print t 
    2121}}} 
    2222 * The general form of a stream type is "foo*" where "foo" is the element type.