mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 15:42:25 +00:00
moved Oberon.Mod to v4_compat directory. -- noch;
Former-commit-id: 2beff88af5
This commit is contained in:
parent
4d34283a4e
commit
d04bc11849
11 changed files with 11 additions and 10 deletions
|
|
@ -1,61 +0,0 @@
|
|||
MODULE Oberon;
|
||||
|
||||
(* this version should not have dependency on graphics -- noch *)
|
||||
|
||||
IMPORT Kernel, Texts, Args;
|
||||
|
||||
TYPE
|
||||
|
||||
ParList* = POINTER TO ParRec;
|
||||
|
||||
ParRec* = RECORD
|
||||
(* vwr*: Viewers.Viewer;
|
||||
frame*: Display.Frame;*)
|
||||
text*: Texts.Text;
|
||||
pos*: LONGINT
|
||||
END;
|
||||
|
||||
VAR
|
||||
|
||||
Log*: Texts.Text;
|
||||
Par*: ParList; (*actual parameters*)
|
||||
W : Texts.Writer;
|
||||
(*clocks*)
|
||||
|
||||
PROCEDURE GetClock* (VAR t, d: LONGINT);
|
||||
BEGIN Kernel.GetClock(t, d)
|
||||
END GetClock;
|
||||
|
||||
PROCEDURE Time* (): LONGINT;
|
||||
BEGIN
|
||||
RETURN Kernel.Time()
|
||||
END Time;
|
||||
|
||||
PROCEDURE PopulateParams;
|
||||
VAR W : Texts.Writer;
|
||||
i : INTEGER;
|
||||
str : ARRAY 32 OF CHAR;
|
||||
BEGIN
|
||||
|
||||
i := 1; (* skip program name *)
|
||||
Texts.OpenWriter(W);
|
||||
|
||||
REPEAT
|
||||
IF i < Args.argc THEN
|
||||
Args.Get(i, str);
|
||||
Texts.WriteString(W, str);
|
||||
Texts.WriteString(W, " ");
|
||||
END;
|
||||
INC(i)
|
||||
UNTIL i >= Args.argc;
|
||||
|
||||
Texts.Append (Par^.text, W.buf);
|
||||
|
||||
END PopulateParams;
|
||||
|
||||
BEGIN
|
||||
NEW(Par);
|
||||
NEW(Par.text);
|
||||
Texts.Open(Par.text, "");
|
||||
PopulateParams;
|
||||
END Oberon.
|
||||
Loading…
Add table
Add a link
Reference in a new issue