AssertIsNull

AssertIsNull 1:

The AssertIsNull method can be used to check whether the passed pointer is NULL. If this is not the case, a corresponding error message can be passed via the sMessage parameter.

Syntax

METHOD PUBLIC AssertIsNull
VAR_INPUT
    fValue : PVOID;
    sMessage : STRING;
END_VAR

AssertIsNull 2: Inputs

Name

Type

Description

fValue

LREAL

Pointer to be compared

sMessage

STRING(255)

Error message to be passed

Sample:

AssertIsNull(pValue:=<Pointer>,sMessage:='Error message to be displayed in the client!');