[fpc-pascal] Integer = Extended?
Wolfram Kläger
wolfram.klaeger at web.de
Thu May 17 02:05:13 CEST 2007
WhatŽs wrong with the following declarations:
function Any(A1 : Extended; A2 : Extended) : AnyType; overload;
function Any(A1 : Integer; A2 : Integer) : AnyType; overload;
FPC 2.04 on Win32 says, both functions have same parameter list. Consequently, there is no error message, when IŽm feeding the extended version with Integers.
Say, such autocast is a convenience feature in many cases. For my application itŽs weird. What is the appropriate workaround? Is there some homemade type checking like
if A1 is Integer then SureItsInteger else SureItsExtended?
Wolfram
More information about the fpc-pascal
mailing list