2005-01-31 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mcs / mbas / Test / tests / RelationalOperators.vb
1 \r
2 Imports System\r
3 \r
4 Module M1\r
5 \r
6     Sub Main()\r
7         Console.WriteLine(f1())\r
8     End Sub\r
9 \r
10     Function f1() As Integer\r
11 \r
12         Dim a As Long = 0\r
13         Dim arr(17) As Boolean\r
14 \r
15         If a < System.Int64.MaxValue Then\r
16             arr(0) = True\r
17         End If\r
18 \r
19         If a <= System.Int64.MaxValue Then\r
20             arr(1) = True\r
21         End If\r
22 \r
23         If System.Int64.MaxValue > a Then\r
24             arr(2) = True\r
25         End If\r
26 \r
27         If System.Int64.MaxValue >= a Then\r
28             arr(3) = True\r
29         End If\r
30 \r
31         If a <> System.Int64.MaxValue Then\r
32             arr(4) = True\r
33         End If\r
34 \r
35         If a = System.Int64.MaxValue Then arr(5) = False Else arr(5) = True\r
36 \r
37         Dim b As Double = 0.0F\r
38 \r
39         If b < System.Double.MaxValue Then\r
40             arr(6) = True\r
41         End If\r
42 \r
43         If b <= System.Double.MaxValue Then\r
44             arr(7) = True\r
45         End If\r
46 \r
47         If System.Double.MaxValue > b Then\r
48             arr(8) = True\r
49         End If\r
50 \r
51         If System.Double.MaxValue >= b Then\r
52             arr(9) = True\r
53         End If\r
54 \r
55         If b <> System.Double.MaxValue Then\r
56             arr(10) = True\r
57         End If\r
58 \r
59         If b = System.Double.MaxValue Then arr(11) = False Else arr(11) = True\r
60 \r
61         Dim c As Decimal = 0D\r
62 \r
63         If c < System.Decimal.MaxValue Then\r
64             arr(12) = True\r
65         End If\r
66 \r
67         If c <= System.Decimal.MaxValue Then\r
68             arr(13) = True\r
69         End If\r
70 \r
71         If System.Decimal.MaxValue > c Then\r
72             arr(14) = True\r
73         End If\r
74 \r
75         If System.Decimal.MaxValue >= c Then\r
76             arr(15) = True\r
77         End If\r
78 \r
79         If c <> System.Decimal.MaxValue Then\r
80             arr(16) = True\r
81         End If\r
82 \r
83         If c = System.Decimal.MaxValue Then arr(17) = False Else arr(17) = True\r
84 \r
85         Console.WriteLine("Array length: {0}", arr.GetUpperBound(0))\r
86         For i As Integer = 0 To arr.GetUpperBound(0)\r
87             Console.Write("i:  {0} ", i)\r
88             Console.WriteLine(arr(i))\r
89         Next\r
90 \r
91         For Each bval As Boolean In arr\r
92             If Not bval Then\r
93                 Return 1\r
94             End If\r
95         Next\r
96 \r
97         Return 0\r
98 \r
99     End Function\r
100 \r
101 \r
102 End Module\r