CheckValueIsANumber
Short summary
This function checks if the given LREAL is a valid number to calculate with.
Return: TRUE if the value is processable, FALSE if NaN or +/-Inf
- Return type:
BOOL
Parameters
| Name | Type | Comment | Kind |
|---|---|---|---|
| value | LREAL | the folating point that should be checked | input |
Code
Declaration
FUNCTION INTERNAL CheckValueIsANumber : BOOL
VAR_INPUT
(* the folating point that should be checked *)
value :LREAL;
END_VAR
Implementation
CheckValueIsANumber := (NOT Tc2_Utilities.LrealIsNaN(value)) AND_THEN Tc2_Utilities.LrealIsFinite(value);