mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 19:12:25 +00:00
parent
4210848dfd
commit
4a32c7d5c1
3 changed files with 15 additions and 7 deletions
|
|
@ -564,8 +564,15 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *)
|
|||
END
|
||||
END GetProperty;
|
||||
|
||||
PROCEDURE power0(i, j : INTEGER) : LONGINT; (* we would like to calculate exact Min Max values in GetProperties, not hardcode em, noch *)
|
||||
VAR k : INTEGER;
|
||||
|
||||
|
||||
PROCEDURE minus(i: LONGINT): LONGINT;
|
||||
BEGIN
|
||||
RETURN -i;
|
||||
END minus;
|
||||
|
||||
PROCEDURE power0(i, j : LONGINT) : LONGINT; (* we would like to calculate exact Min Max values in GetProperties, not hardcode em, noch *)
|
||||
VAR k : LONGINT;
|
||||
p : LONGINT;
|
||||
BEGIN
|
||||
k := 1;
|
||||
|
|
@ -674,11 +681,12 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *)
|
|||
|
||||
|
||||
MinSInt := power0(-2, (SIntSize*8-1)); (* -2^(SIntSize*8-1)*)
|
||||
MaxSInt := power0(2, (SIntSize*8-1))-1;
|
||||
(*MaxSInt := -(MinSint + 1);; may be optimized?*)
|
||||
MaxSInt := minus(MinSInt + 1);
|
||||
MinInt := power0(-2, (IntSize*8-1));
|
||||
MaxInt := power0(2, (IntSize*8-1))-1;
|
||||
MaxInt := minus(MinInt + 1);
|
||||
MinLInt := power0(-2, (LIntSize*8-1));
|
||||
MaxLInt := power0(2, (LIntSize*8-1))-1;
|
||||
MaxLInt := minus(MinLInt +1);
|
||||
|
||||
(*
|
||||
Console.Int(MinSInt, 0); Console.Ln;
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
ddb127a2e317296bc2e9e45f089e5a938c5e7bed
|
||||
90416871552aca31fdc4f4df787d5ad56448ca5d
|
||||
|
|
@ -1 +1 @@
|
|||
3326a0fc447824a7e2a6d9b35c79b178bfe7ea61
|
||||
90416871552aca31fdc4f4df787d5ad56448ca5d
|
||||
Loading…
Add table
Add a link
Reference in a new issue