Skip to main content

valueIsNegative

Short summary

This assertion method checks if the current value is negative

Attention: Any comparsion to NaN is FALSE that means if currentValue is NaN then is the assertion false. For details check IEEE 754_.

Attention: currentValue has the value infinity means the assertion is false. currentValue has the value -infinity means the assertion is true. currentValue has the +0.0 means the assertion is false. currentValue has the value -0.0 means the assertion is true. For details check IEEE 754.

Parameters

NameTypeCommentKind
currentValueLREALcurrent value to checkinput
messageAssertMessagemessage if the assertion is falseinput

Code

Declaration

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