> On Nov 7, 2019, at 12:28 PM, Ben Grasset via fpc-pascal > <fpc-pascal@lists.freepascal.org> wrote: > > {$IF GetTypeKind(T) in [tkInteger, tkInt64, tkQWord]} > Result := A div B > {$ELSEIF GetTypeKind(T) = tkFloat} > Result := A / B > {$ELSE} > Result := Default(T); > {$ENDIF}
This is what I hinted in my post. Has anything like this been considered before? It seems necessary to me but it looks like Sven had some fancy work around using pointers. Either way the compile time directive would be faster and avoid the conditional statements. Regards, Ryan Joseph _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal