CALC 1 Home Documentation Home Contact

CALC 1 c1 History Functions

These functions are used to create custom History items.

In Key scripts, turn off the history property in the Key Editor if you are creating a custom History Item.

Property Description Example Result
histTitle Set the title of the history item. This is required for a custom history item. If you have turned off the history property of a key and do not set a title, no history item will be created. c1.histTitle('Rectangular to Polar');  
histComment Takes a string argument to add a comment to the history item. The comments will appear above the table populated with the histKeyValue function. c1.histComment('A linear (LIN) curve fit, y = m * x + b, has the max correlation');  
histKeyValue Used to write a key-value with a description to the history item.
The values and description will appear in a table in the history item.
The values are formatted using the current format settings.
The keys and values are used to restore values from the history item.
Only set the key value for properties of c1.
c1.histKeyValue('rgx', x, 'The hypotenuse.');
Without a key:
c1.histKeyValue('', c1.calcObj.mu, 'The % Markup.');
 
histObjSave Used to save the current values of the current calcObj so it can be restored from history. c1.histObjSave(c1.calcId, c1.calcObj);  
histListSave Used to save the given list in the history item. The list will then be displayed in the history item and can be restored.
The first argument should be one of the c1 array properties, listx, listy or listf.
c1.histListSave('listx', c1.listx);  
histFVal Used to save a formatted value comment to the history item.
The first argument, the format string uses the format patterns fromĀ Unicode Technical Standard #35.
The second argument is a value.
c1.histFVal('Tax :#,###.##', tax);"  
format Used to format values. This does not create an entry in the history item, but it can be used to create history comments or in status scripts.
The first argument, the format string uses the format patterns fromĀ Unicode Technical Standard #35.
The second argument is a value.
c1.format('Tax :#,###.##', tax);
 
formatFraction(value, maxFractionDenominator, mostPrecise, fixedDemon) Returns a string of the value formatted as a fraction. See the User Options for details of the arguments.
c1.formatFraction(Math.PI, 4095, true, false);
3 16/113
spellout Spells out the number in the current language.
c1.spellout(1234); one thousand two hundred thirty-four