root/trunk/ProjectFortress/not_passing_yet/builtinPrimTest.fss

Revision 3550, 1.2 KB (checked in by sukyoungryu, 9 months ago)

[copyright] Fixed the copyright notices.

Line 
1(*******************************************************************************
2    Copyright 2009 Sun Microsystems, Inc.,
3    4150 Network Circle, Santa Clara, California 95054, U.S.A.
4    All rights reserved.
5
6    U.S. Government Rights - Commercial software.
7    Government users are subject to the Sun Microsystems, Inc. standard
8    license agreement and applicable provisions of the FAR and its supplements.
9
10    Use is subject to license terms.
11
12    This distribution may include materials developed by third parties.
13
14    Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered
15    trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
16 ******************************************************************************)
17
18component builtinPrimTest
19export Executable
20
21object MyChar(val:Char)
22    myJavaDigit(self, radix:ZZ32): ZZ32 =
23        builtinPrimitive("com.sun.fortress.interpreter.glue.prim.Char$JavaDigit")
24    myDigit(self, radix:ZZ32): Maybe[\ZZ32\] = do
25        x:ZZ32 = myJavaDigit(self, radix)
26        if(x = -1) then
27             Nothing[\ZZ32\]
28        else
29             Just[\ZZ32\](x)
30        end
31    end
32end
33
34run():() = do
35    c = MyChar('5')
36    myDigit(c, 10)
37end
38
39end
Note: See TracBrowser for help on using the browser.