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

AVEVA™ InTouch HMI

Trunc() Function

  • Last UpdatedFeb 21, 2017
  • 1 minute read

Returns the truncated value of a number. The truncated value is the part before a decimal point. Use it to work with the integer part of a real number.

Syntax

result = Trunc (number)

Parameters

number

A literal number, analog tagname, or numeric expression.

Example(s)

Trunc(4.3) returns 4.

Trunc(-4.3) returns -4.

Note: You can also use this function to work with the fractional part of a number. To return the fractional part of a specified number use the Trunc() function as follows:
result = number - trunc(number);

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