[fpc-pascal] Quiz
Tomas Hajny
XHajT03 at hajny.biz
Sun Jan 7 22:51:51 CET 2024
On 2024-01-07 20:47, Michael Van Canneyt via fpc-pascal wrote:
> On Sun, 7 Jan 2024, Adriaan van Os via fpc-pascal wrote:
.
.
> There is some special handling for 1. (ending with a dot) due to
> Delphi/TP compatibility, they accept it.
.
.
>> kr5 = 1 . e + 2;
>
> Same as kr1, but not accepted by Delphi.
Personally, I don't think that a dot directly following a number is the
same as a dot separated from the number by a space. TP/BP doesn't accept
the latter (i.e. kr5).
>> kr6 = 1 . 0 e + 2;
>
> kr6 does not compile, although I don't see why if kr5 is accepted..
Well, I'm not sure whether kr5 should be accepted, but anyway, there are
IMHO two problems here - the second one being the space before the
exponent marker.
>> kr8 = 1.0 e + 2;
>
> kr8 Does not compile, probably same reason as kr6. Delphi does not
> accept it.
TP/BP requires the exponent marker (i.e. "e") to follow the number
directly. Spaces in the exponent part are allowed, but not before "e".
Tomas
More information about the fpc-pascal
mailing list