1 # This file is part of NIT ( http://www.nitlanguage.org ).
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 # Declares base types allowed on the platform.
22 # Used for comparisons.
23 type OTHER: nullable Object
25 # Is `other` equqls to `self`?
26 fun ==(other
: OTHER): Bool is intern
28 # Is `other` different from `self`?
29 fun !=(other
: OTHER): Bool do return not self == other
32 # Some services about Integers.
35 fun +(i
: Int): Int is intern
36 fun -(i
: Int): Int is intern
37 fun *(i
: Int): Int is intern
38 fun /(i
: Int): Int is intern
39 fun >(i
: Int): Bool is intern
40 fun to_f
: Float is intern
43 # Some services about Floats.
45 fun +(f
: Float): Float is intern
46 fun -(f
: Float): Float is intern
47 fun *(f
: Float): Float is intern
48 fun /(f
: Float): Float is intern
49 fun >(f
: Float): Bool is intern
52 # Booleans, `true` or `false`.
55 # Strings (there is no chars...).