summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bc16916)
raw | patch | inline | side by side (parent: bc16916)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Wed, 9 Aug 2017 18:11:58 +0000 (21:11 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Wed, 9 Aug 2017 18:11:58 +0000 (21:11 +0300) |
Out.obn | patch | blob | history | |
rtl/Out.java | patch | blob | history | |
rtl/System.java | patch | blob | history | |
src/oberon.c | patch | blob | history |
index dce767ca8def8383e98c1f243fbeddd0b719edcf..9a923c25a28f0354709f752196232d1b957c952d 100644 (file)
--- a/Out.obn
+++ b/Out.obn
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 429d3214773b9b27fdf8974fa98e1f193e1fec00..99899776c45ad838e94f8649f1d6fe9bd2049e54 100644 (file)
--- a/rtl/Out.java
+++ b/rtl/Out.java
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 08411e7625f896886a3032037fd9b65ef416ed44..d2ccf9b5d8cdef65e254743e3bb8374ae0e5679f 100644 (file)
--- a/rtl/System.java
+++ b/rtl/System.java
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 cf1a570f8084f96c21234f7de51ad5e1c4406676..bf5dad872cbdc3c420dec670d8c5de40c463f5d3 100644 (file)
--- a/src/oberon.c
+++ b/src/oberon.c
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);
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);
}