In the following table, the first column lists the build-in types defined by the Oxygene and Hydrogene languages. These standard types (or type aliases) are defined in the virtual RemObjects.Oxygene.System (.NET and Cocoa) or com.remobjects.oxygene.system (Java) namespace. This namespace is in scope by default, so these type names can be referred to without namespace prefix (but the namespace prefix can be used to avoid ambiguities, in case other user-defined types interfere with the names).
The remaining three columns denote which types these names map to as .NET types, Java Language intrinsic type names and (Objective-)C language intrinsic types, respectively.
|Int8, ShortInt||System.SByte||byte (!)||int8_t|
|UInt32, Cardinal, LongWord||System.UInt32||N/A||uint32_t|
|NativeInt (.NET & Cocoa)||System.IntPtr||N/A||NSInteger|
|NativeUInt (.NET & Cocoa)||System.UIntPtr||N/A||NSUInteger|
|Extended, Real (Delphi compatibility)||System.Double||double||double|
The default type of an Integer Literal is determined by the first type from the following list that can hold the number: Int32, UInt32, Int64, UInt64 and BigInteger (the latter currently limited to the .NET platform).
Notes for Cocoa
- For Boxing purposes, integer types will be boxed into NSNumber<T> instances as needed, while preserving type safety and information about the concrete contained integer type.
- Instance methods of the NSNumber class are available on all integer types, and the compiler will perform boxing as needed.
- The rtl.* namespaces are in scope by default, but RemObjects.Oxygene.System has higher precedence, so the Oxygene and Hydrogene type names are accessible by default.
Notes for Java
- Java gained support for unsigned integer types in the July 2013 release of Oxygene 6. Note that unsigned types are not supported by the Java Language, so care should be taken when writing libraries or other code that will be consumed by Java Language developers.
- For Boxing purposes, integer types will be boxed into the appropriate types from the java.lang namespace, e.g. nullable com.remobjects.oxygene.system.Boolean would be boxed into a java.lang.Boolean.
- Instance methods of the boxing types defined in java.lang are available on all integer types, and the compiler will perform boxing as needed.
- The java.lang namespace is in scope by default, but com.remobjects.oxygene.system has higher precedence, so the Oxygene and Hydrogene type names are accessible by default.