index

Varkon MBS Programmers manual

# frac - Function

## Description

Returns the fractional part (decimals) of a FLOAT argument.

## Syntax

      dec:=frac(x);

      float dec;
      float x;

## Principal parameters

x | - A value.

## Optional parameters

None.

## Return value

A FLOAT value equal to the decimal fraction of x. If x is positive, frac(x) is also positive and if x is negative, frac(x) is negative.

## Example

       dec:=frac(25.35);   ! Returns 0.35
       dec:=frac(-0.99);   ! Returns -0.99

Varkon version 1.19C svn# 120