Fortress Programming Language Tutorial.pdf - Free
Fortress Programming Language Tutorial.pdf - Free
Fortress Programming Language Tutorial.pdf - Free
- No tags were found...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Fortress</strong> <strong>Programming</strong> <strong>Language</strong> <strong>Tutorial</strong>, PLDI, 11 June 2006Indexing and Assignment• Specified by the trait Indexable:trait Indexable⟦Self extends Indexable⟦Self,E,I⟧,E extends Object, I extends Object⟧extends Objectopr [ i : I ] : Eopr [ i : I ]:=( e : E ) : ()endtrait Array⟦E extends Object, I extends ArrayIndex⟧extends Indexable⟦ Array⟦E, I⟧, E, I ⟧...end• The type notation T[a,b] is simply shorthand forArray⟦T,(a,b)⟧© 2006 Sun Microsystems, Inc. All rights reserved.43