Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Hull and Outfitting

Example - Using Methods

  • Last UpdatedNov 10, 2025
  • 1 minute read

This section explains how to use methods, using a STRING variable as an example.

Although the STRING is a simple object type, it has a large number of methods which can be called.

For example, if you are interested in the length of the string value, look under the list in the Software Customization Reference Manual for STRING objects, and you will find a method named Length.

This method returns a REAL value (the number of characters in the string), but has no effect on the variable itself.

  • To extract the number of characters in the string and store it in a new variable, !Nchars, call the following method:

    !Nchars = !MyString.length() $* A method call

    Notice the dot separator between the name of the variable and the name of the method.

    Also note the ( ) brackets following the name of the method. The brackets are used to enclose the arguments of the method, but they must be present even if there are no arguments.

TitleResults for “How to create a CRG?”Also Available in