Re: Delphi Real

[ DelphiLand Discussion Forum ]

Posted by webmaster Guido on August 30, 2002 at 05:17:37:

In Reply to: REal posted by Duncan on August 30, 2002 at 00:08:22:

: What does real at the end of the code mean
: function vithVAT (Amout: real) : real ;

Let's look at an example:

function WithVat(Amount: real): real;
  Result := Amount * 1.21; // VAT is 21%

The first real means that the parameter Amount must be a "real" number ("floating point" number, number with a decimal fraction).

The second real means that the result of the function is a "real" number.

[ DelphiLand Discussion Forum ]