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

AVEVA™ Engineering

Example for Methods of an Object

  • Last UpdatedJan 28, 2025
  • 1 minute read

Example 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 documentation 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.

You can extract the number of characters in the string and store it in a new variable !Nchars, by calling the method as follows:

!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