From 776edd758b261bd4f7c5c7cd758edef40e8b4f64 Mon Sep 17 00:00:00 2001 From: DeaDDooMER Date: Wed, 9 Aug 2017 21:11:58 +0300 Subject: [PATCH] =?utf8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D1=8B?= =?utf8?q?=20=D1=80=D0=B0=D0=B7=D0=BC=D0=B5=D1=80=D1=8B=20=D0=BF=D1=80?= =?utf8?q?=D0=B8=D0=BC=D0=B8=D1=82=D0=B8=D0=B2=D0=BD=D1=8B=D1=85=20=D1=82?= =?utf8?q?=D0=B8=D0=BF=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Out.obn | 2 +- rtl/Out.java | 6 +++--- rtl/System.java | 2 +- src/oberon.c | 14 +++++++------- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Out.obn b/Out.obn index dce767c..9a923c2 100644 --- a/Out.obn +++ b/Out.obn @@ -9,7 +9,7 @@ END Char; PROCEDURE String*(str : ARRAY OF CHAR); END String; -PROCEDURE Int*(i, n : LONGINT); +PROCEDURE Int*(i : HUGEINT; n : INTEGER); END Int; PROCEDURE Real*(x : REAL; n : INTEGER); diff --git a/rtl/Out.java b/rtl/Out.java index 429d321..9989977 100644 --- a/rtl/Out.java +++ b/rtl/Out.java @@ -22,17 +22,17 @@ public class Out System.out.write(str, 0, i); } - public static void Int(long i, long n) + public static void Int(long i, short n) { System.out.print(i); } - public static void Real(float x, int n) + public static void Real(float x, short n) { System.out.print(x); } - public static void LongReal(double x, int n) + public static void LongReal(double x, short n) { System.out.print(x); } diff --git a/rtl/System.java b/rtl/System.java index 08411e7..d2ccf9b 100644 --- a/rtl/System.java +++ b/rtl/System.java @@ -1,6 +1,6 @@ public class System { - public static void Halt(int n) + public static void Halt(short n) { java.lang.System.exit(n); } diff --git a/src/oberon.c b/src/oberon.c index cf1a570..bf5dad8 100644 --- a/src/oberon.c +++ b/src/oberon.c @@ -3751,17 +3751,20 @@ register_default_types(oberon_context_t * ctx) ctx -> bool_type = oberon_new_type_boolean(); oberon_define_type(ctx -> world_scope, "BOOLEAN", ctx -> bool_type, 1); + ctx -> char_type = oberon_new_type_char(1); + oberon_define_type(ctx -> world_scope, "CHAR", ctx -> char_type, 1); + ctx -> byte_type = oberon_new_type_integer(1); - oberon_define_type(ctx -> world_scope, "BYTE", ctx -> byte_type, 1); + oberon_define_type(ctx -> world_scope, "SHORTINT", ctx -> byte_type, 1); ctx -> shortint_type = oberon_new_type_integer(2); - oberon_define_type(ctx -> world_scope, "SHORTINT", ctx -> shortint_type, 1); + oberon_define_type(ctx -> world_scope, "INTEGER", ctx -> shortint_type, 1); ctx -> int_type = oberon_new_type_integer(4); - oberon_define_type(ctx -> world_scope, "INTEGER", ctx -> int_type, 1); + oberon_define_type(ctx -> world_scope, "LONGINT", ctx -> int_type, 1); ctx -> longint_type = oberon_new_type_integer(8); - oberon_define_type(ctx -> world_scope, "LONGINT", ctx -> longint_type, 1); + oberon_define_type(ctx -> world_scope, "HUGEINT", ctx -> longint_type, 1); ctx -> real_type = oberon_new_type_real(4); oberon_define_type(ctx -> world_scope, "REAL", ctx -> real_type, 1); @@ -3769,9 +3772,6 @@ register_default_types(oberon_context_t * ctx) ctx -> longreal_type = oberon_new_type_real(8); oberon_define_type(ctx -> world_scope, "LONGREAL", ctx -> longreal_type, 1); - ctx -> char_type = oberon_new_type_char(1); - oberon_define_type(ctx -> world_scope, "CHAR", ctx -> char_type, 1); - ctx -> set_type = oberon_new_type_set(4); oberon_define_type(ctx -> world_scope, "SET", ctx -> set_type, 1); } -- 2.29.2