Ver código fonte

Examples changed

Arthur Yefimov 3 anos atrás
pai
commit
0d14b7e985
2 arquivos alterados com 14 adições e 3 exclusões
  1. 1 1
      Programs/GEVM.Mod
  2. 13 2
      Programs/r.Mod

+ 1 - 1
Programs/GEVM.Mod

@@ -93,7 +93,7 @@ VAR i: INTEGER;
   ok: BOOLEAN;
 BEGIN
   ok := TRUE;
-  font := G.LoadFont("data/images/font.bmp", 8, 16);
+  font := G.LoadFont("data/images/font.bmp");
   IF font = NIL THEN
     Out.String("Could not load font."); Out.Ln;
     ok := FALSE

+ 13 - 2
Programs/r.Mod

@@ -2,12 +2,23 @@ MODULE r;
 IMPORT In, Out;
 VAR a, b, c: INTEGER;
   x, y: REAL;
-  s: ARRAY 32 OF CHAR;
+  s: ARRAY 10 OF CHAR;
+  i: INTEGER;
 BEGIN
+  s := 'Привет!';
+  s[2] := 'ы';
+  Out.String(s);
+  Out.Char('Ж');
+  Out.Ln;
+
   Out.String('Please enter a real number.'); Out.Ln;
   Out.String('x='); In.Real(x);
-  Out.String('['); Out.RealFix(x, 0, 10); Out.String(']'); Out.Ln;
+  Out.String('['); Out.RealFix(x, 8, 3); Out.String(']'); Out.Ln;
   Out.String('Enter string:'); In.Line(s);
   Out.String('{'); Out.String(s); Out.String('}'); Out.Ln;
+  i := 0;
+  WHILE (i < LEN(s)) & (ORD(s[i]) # 0) DO
+    Out.Int(ORD(s[i]), 5); INC(i)
+  END; Out.Ln;
   Out.String('Bye!'); Out.Ln
 END r.