Loading...
 

CX_TRANSACTION::MultiplyToTop

CX_TRANSACTION::MultiplyToTop

Description:

This class function multiplies the content of the desired slot by the same slot of the higher-level transactions. Only CX_VALUEs are considered. If there is no CX_VALUE in the whole chain, NULL is returned.

The unit from the slot of called CX_TRANSACTION object, determines the unit of the result. In the image example the function returns 6 m as result.

Code example:

Define(RequiredQuantityPicture)
Dup Get(MultiplyToTop("quantity")) -> quantity
quantity ifnot { Drop whiteBmp return }
RequiredQuantity -> requiredQuantity
requiredQuantity ifnot { whiteBmp return }
quantity requiredQuantity Call(ConvertWeak) ifnot { whiteBmp return }
requiredQuantity Call(IsZero) if { whiteBmp return }
quantity requiredQuantity > if indigoWatchBmp else indigoArrowBmp
;

Stack
Stack Position Object type Brief description
Stack(In) Top CX_TRANSACTION A transaction
Top 1 STRING Slot name
Stack(Out) Top CX_VALUE Value or NULL
Function call: Call(MultiplyToTop)