Ewald schrieb:
On 03 Mar 2014, at 12:49, Hans-Peter Diettrich wrote:
How (which data type) does *your* parser store untyped numerical
constants?
Roughly like this (syntax may be a bit awry, but you get the point):
TIntegerNumber = Record Case SignedNess: TSignedNess of snPositive:
UValue: QWord; snNegative: SValue: Int64; End;
The parser detects wether there is a `-` in front of the constant and
stores the right sign in the SignedNess field.
A parser doesn't work like that - too many possible cases with unary
minus. If you need an datatype for integers with more bits than provided
by the compiler, you must roll your own datatype.
Alright, let me rephrase my demands: - I want to store the value
18446744073709551615 in any kind of variable without loss of
precision.
See above.
DoDi
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel