AssertIsNull

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
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!');