Val: Variant;
The Val method returns the value by the current coordinate.
This method is used in the user macros that calculate values by the current coordinate in a calculated cube.
This example is a macro for a calculated cube.
Function MyFunc(Param: Variant): Variant;
Var
Coord, Coord1: ICalculatedCubeInstanceCoord;
i: Integer;
Begin
Coord := Param As ICalculatedCubeInstanceCoord;
Coord1 := Coord.Shift(1);
i := Coord1.Val As Integer;
i := i + Math.RandBetweenI(0, 10);
Return i As Variant;
End Function MyFunc;
On executing a macro, values in the current coordinate of the calculated cube are calculated. During calculation a random integer is added to the value of the previous coordinate.
See also: