Functions (all)

Calc

Function Name:
Calc
Description:
This is a very simple 'wrapper' function. It takes a number value and returns that value. It can be useful as a wrapper if you want to use numeric operators (e.g. '+' or '-') to combine various numeric expressions together. Use brackets where useful and appropriate (e.g. =Calc((43*17) + (124/17))). The numbers returned are always whole numbers. Decimal points are lost.

Note: numeric operators can be combined in forming a parameter to any function (that takes a numeric parameter). There is nothing special about this function as far as that goes. There is no need to use the Calc function to calculate the value of an expression if you are then passing this value as a parameter to another function.

For example,

=DateAt(Year(%INDI.BIRT.DATE%)+100, 1, 1)

will return you the date of the first of January, of the year that is 100 years after a given person's birth. There is no need to write it like this:

=DateAt(Calc(Year(%INDI.BIRT.DATE%)+100), 1, 1)

although of course you could.

Minimum FH Version:
4.0
No. of Parameters:
1
Return Type:
Number
Parameter 1:
A number
Examples:

=Calc(Year(%INDI.BIRT.DATE%)+100)