Difference between revisions of "CALC()"

From Recital Documentation Wiki
Jump to: navigation, search
 
Line 1: Line 1:
 
==Class==
 
==Class==
Input/Output
+
Numeric Data
  
  
Line 30: Line 30:
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
[[Category:Numeric Data]]
 +
[[Category:Numeric Data Functions]]

Revision as of 13:51, 3 June 2009

Class

Numeric Data


Purpose

Function to perform report calculation


Syntax

CALC(<memvar>, <expN>)


See Also

ACC(), CREATE REPORT, REPORT


Description

The CALC() function evaluates the specified numeric expression <expN>, places the result in the designated accumulator <memvar>. The return value of the CALC() function is the result of the numeric expression <expN>. This function is only valid in report format <.frm> files. The CALC() function should be used in conjunction with the ACC() function. There are 20 accumulators available, which are cleared to zero at the start of the report (REPORT FORM command). The first 10 accumulators are cleared on each sub-total break, and the last 10 are carried through to the end of the report. These accumulators are useful for providing horizontal totaling facilities.


Example

calc(1, acc(1) + order_value)


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer