Reference Types

There are more reference types that inherit from Entity_.

Note: There is no array or list type in OTScript since all variables, functions, and methods work with lists of values, even for primitive types.



Reference Types Description
Entity_

This is the base type of objects.

The difference with primitive types is that an object can be associated with more data such as attributes, which are likely to reference other objects.

There is no explicit memory management for objects since the garbage collector can recover memory space from objects that are no longer used.

String Like in Java, a string is considered as an object.

Special characters are escaped by character “:

  • n: Carriage return
  • t: Tabulation
  • “: Quote
Examples: "The black cat", "Two"nlines"

For more information, see Functions on String.

Dictionary This type of object corresponds to Java's HashMap but it is not generic so it uses Entity_ type for both key and value.

For more information, see Methods on Dictionary.

XmlNode The XMLPARSE function returns this type of object.

For more information, see XML Functions and Methods.