Skip to main content

valueIsSpecial

Short summary

This assertion method checks if the current value is a special (NaN OR infinity OR -inifinity), for details check IEEE 754

Parameters

NameTypeCommentKind
currentValueLREALcurrent value to checkinput
messageAssertMessagemessage if the assertion is falseinput

Code

Declaration

METHOD valueIsSpecial
VAR_INPUT
(* current value to check *)
currentValue :LREAL;
(* message if the assertion is false *)
message :AssertMessage;
END_VAR

Implementation

IF (NOT THIS^.isValueSpecial(currentValue)) THEN
THIS^.assertionWasWrong(message, THIS^.getDebugInfo('valueIsSpecial'));
END_IF