CALC 1 Home Documentation Home Contact

CALC 1 c1 List (array) Functions

CALC 1 has 3 JavaScript Array object properties, c1.listx, c1.listy and c1.listf that can be edited with the List Manager. The listx is used for 1 list stats, listx and listy for 2 list stats and listf for cash flows.

These lists can be visually managed using the List Manager.

Use the JavaScript Array object for other array functionality.

Function Description Example Result
appendx, appendy, appendf(value) Appends the value to the list.
The value can also be an array of numbers.
c1.appendx(1.2); The length of the array.
clrx, clry, clrz Clears the specified list. c1.clrx(); 0

As of version 4.3 the arrays are stored internally as immutable arrays (NSArray).
To use JavaScript array methods, assign a variable:

let myarray = c1.listx;

The c1 properties can be set to JavaScript arrays:

c1.listx myArray;