DEADSOFTWARE

Исправлены VAR-параметры, добавлены модули Files и Strings
[dsw-obn.git] / rtl / Out.java
index 309578afe881cccdb7078a6bc2cdca151fcb0bf8..68a7375ef2f54c956ee164e725e050940afbe51c 100644 (file)
@@ -4,20 +4,36 @@ public class Out
 {
        public static void Open()
        {
+               // Сюда можно что-нибудь затолкать...
+               // Например открытие окошка и высер в него
+       }
+
+       public static void Char(byte ch)
+       {
+               System.out.write(ch);
+       }
 
+       public static void String(byte[] str)
+       {
+               int i = 0;
+               while(str[i] != 0)
+               {
+                       i += 1;
+               }
+               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);
        }
@@ -26,4 +42,10 @@ public class Out
        {
                System.out.println();
        }
+
+       public static void BEGIN()
+       {
+               // Функция выполняется каждый раз когда модуль импортируется.
+               // Модуль должен сам проверять, импортировался ли он ранее.
+       }
 }