Extracts a specified part of a number, real or integer.
Syntax:
Fix(number,whole,decimal)
Parameters:
number: The number subjected to the operation. whole: The number of digits to be extracted from the integer part of number. Magic xpa counts the digits from the decimal separator leftwards. decimal: The number of digits to be extracted from the decimal part of number. Magic xpa counts the digits from the decimal separator rightwards.
Returns:
A numeric value
Example:
Fix(12345.6789,3,3) returns 345.678
The statement IF(Fix(M,2,0)=99,N+1,N) checks the number M; if the last two digits of its whole part are 99, it increments N.