Cicode Programming Reference > Cicode Function Categories > Trend Functions Introduction > TrnIsValidValue

TrnIsValidValue

Determines whether a logged trend value is:

Syntax

TrnIsValidValue(TrendValue)

TrendValue:

A trend value (of type REAL).

Return Value

0 for <VALID>

1 for <GATED>

2 for <INVALID>

Related Functions

TrnGetGatedValue, TrnGetInvalidValue

Example

INT
FUNCTION
DoubleArray()
INT i;
FOR i = 0 TO 99 DO
IF TrnIsValidValue(oldArray[i]) = 1 OR trigger = 0 THEN
newArray[i] = TrnGetGatedValue();
Prompt ("This value is <GATED>");
ELSE
IF i >= 90 OR TrnIsValidValue(oldArray[i]) = 2 THEN
newArray[i] = TrnGetInvalidValue();
ELSE
newArray[i] = oldArray[i] * 2;
Prompt ("This value is <TRN_NO_VALUES>");
END
END
END
RETURN i;
END

See Also

Trend Functions