About Methods and Functions

A large number of methods and a few functions are available in the OTScript language to help you define your code.

Important: Most methods are auto-generated from the PLM allowing direct access to the datamodels, but beware that the datamodels may evolve independently of your will and the behavior of some methods can change.

Methods are distinguished from functions by the following rules:

  • Method names are written in lower camel case. For more information, see Recommendations for Naming Conventions.
  • Function names are written in upper case. The functions are applied to the elements of lists, except when their name begins with $, in which case the first argument is treated as a list.

    For example:

    • STRMATCH(string1, string2), where:
      • string1 is a string
      • string2 is a string
      returns the TRUE if the two strings match.
    • $STRSEP(strings, separator), where:
      • strings is a list of strings
      • separator is a string
      returns the concatenation of all the elements of the list strings with the separator between each elements.