> For constants, the compiler will choose a type and consequently the > precision. > Jonas and others have explained the rules that the compiler uses. > > If you don't like the rules that the compiler uses, you can set a type for > your > constants. When you explicitly set a type, you are also specifying the > precision of the > calculation.
If the ruleset won't change - and from what I've read from the developers, it won't change - could we please have the compiler issue a warning (or a hint) if a loss in precision happens. E.g. "Warning: constant reduced to single precision. Use {$MINFPCONSTPREC} or Double() to keep full precision." I am aware about this behavior now, but nevertheless I'd like to get warned if I forget about either of those. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal