The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Declaration:procedure CancelFraction (var numer, denom: integer);

The procedure CancelFraction cancels the fraction specified by its numerator numer and its demoninator denom as far as possible.

Example: The following statements will cancel the fraction 12/64:

  num := 12;
  den := 64;
  CancelFraction (num, den);

After the execution of CancelFraction the variables num and den hold the values 3 and 16, respectively, which corresponds to the cancelled fraction 3/16 (=12/64).

Last Update: 2012-Oct-20