isEven

isEven(): Boolean;

The isEven method of the Integer primitive type returns true if the receiver represents an even number or it returns false if it does not.

The following example shows the use of the isEven method.

setColor(prod: Product) updating;
begin
    if prod.isNew then
        listProducts.itemForeColor[listProducts.newIndex] := Red;
    else
        listProducts.itemForeColor[listProducts.newIndex] := Gray;
    endif;
    if listProducts.newIndex.isEven then
        listProducts.itemBackColor[listProducts.newIndex] := LightYellow;
    endif;
end;