Core runtime library providing primitive types (Bool, Byte, Char, Int, Float, String), the Ref wrappers and array helpers, and system utilities (console, files, threads, sockets). Collections are not here: they are in gen_collect.obl. Every Objeck program links against this bundle automatically via lang.obl.
Base
Base class for all objects
Operations
GetClass #
Returns the class associated with this instance
method : public : GetClass() ~ Introspection.ClassReturn
| Type | Description |
|---|---|
| Introspection.Class | associated with this instance |
GetClassID #
Returns the unique class ID
method : public : GetClassID() ~ IntReturn
| Type | Description |
|---|---|
| Int | unique class ID |
GetInstanceID #
Returns the unique instance ID
method : public : GetInstanceID() ~ IntReturn
| Type | Description |
|---|---|
| Int | unique instance ID |
Otherwise #
Compiler intrinsic: returns the receiver if non-Nil, otherwise returns the default value.
method : public : Otherwise(default:Base) ~ BaseParameters
| Name | Type | Description |
|---|---|---|
| default | Base | default value to return if receiver is Nil |
Return
| Type | Description |
|---|---|
| Base | receiver if non-Nil, otherwise default |
ToString #
Returns a string for the instance. A Stringify instance prints its own ToString; any other prints its class name and hex instance ID, joined by an at sign. A concrete method is bound statically, so a ToString a class declares without implementing Stringify is not reached through a Base reference: implement Stringify for that.
method : public : ToString() ~ StringReturn
| Type | Description |
|---|---|
| String | string for the instance |