Null

This keyword represents the null instance.

An instance variable which has been declared but not assigned yet is null.

Syntax

null

Example

# Creates child instances (lines) in a sales order from arrays of products and quantities# If product code is empty or quantity is zero no line is createdFunprog CREATE_LINES(MY_ORDER, PRODUCTS, QUANTITIES)Variable Instance MY_ORDER with C_SALESORDERVariable Char PRODUCTS()(1..)Variable Decimal QUANTITIES(1..)Local Integer I, LINE_COUNTFor I=1 to dim(PRODUCTS)If PRODUCTS(I)<>"" and QUANTITIES(I)<>0SALESORDER.LINES(I)=NewInstance C_SORDERLINE AllocGroup SALESORDERSALESORDER.LINES(I).PRODUCT=PRODUCTS(I)SALESORDER.LINES(I).QUANTITY=QUANTITIES(I)EndifNext ILINE_COUNT=0For I=1 to dim(PRODUCT)# Increment LINE_COUNT only if SALESORDER.LINES(I) has been allocatedLINE_COUNT+=(SALESORDER.LINES(I)<>null)Next IEnd LINE_COUNT

See also

Structure, FreeInstance, FreeGroup, Instance, NewInstance, SetInstance, allocgrp, cast.