| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- Listing:
- 1 (* Release 3.10 *)
- 2 (*-------------------------------------------------------------------------*
- 3 * *
- 4 * TERMINAL.MOD - Terminal i/o (core library) *
- 5 * *
- 6 * COPYRIGHT (C) 1987..1992 Clarion Software Corporation. *
- 7 * All Rights Reserved *
- 8 * *
- 9 *--------------------------------------------------------------------------*)
- 10
- 11 (*$V-*)
- 12 IMPLEMENTATION MODULE Terminal ;
- 13
- 14 (* Core library interface *)
- 15
- 16 IMPORT Str,IO,ASCII ;
- 17
- 18 VAR
- 19 CharBuffered : BOOLEAN ;
- 20 SaveChar : CHAR ;
- 21
- 22 PROCEDURE Read ( VAR v : CHAR ) ;
- 23 BEGIN
- 24 IF CharBuffered THEN
- 25 v := SaveChar ;
- 26 CharBuffered := FALSE ;
- 27 ELSE
- 28 SaveChar := IO.RdKey() ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 29 v := SaveChar ;
- 30 END ;
- 31 END Read ;
- ***** ^ not supported yet
- 32
- 33
- 34 PROCEDURE ReadAgain ;
- 35 BEGIN
- 36 CharBuffered := TRUE ;
- 37 END ReadAgain ;
- ***** ^ not supported yet
- 38
- 39
- 40 PROCEDURE ReadString ( VAR v : ARRAY OF CHAR ) ;
- ***** ^ not supported yet
- 41 VAR
- 42 c : CHAR ;
- 43 line : ARRAY[0..255] OF CHAR ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 44 p : CARDINAL ;
- 45 BEGIN
- 46 p := 0 ;
- 47 REPEAT Read(c) UNTIL c<>' ' ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 48 LOOP
- 49 IF (c=ASCII.bs)OR(c=ASCII.del) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 50 IF p>0 THEN
- 51 DEC(p) ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 52 Write(ASCII.bs);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 53 Write(' ');
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 54 Write(ASCII.bs);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 55 END ;
- 56 ELSIF (c>' ')AND(c<CHR(80H)) THEN
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 57 Write(c) ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 58 IF p<SIZE(line) THEN
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 59 line[p] := c ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 60 INC(p) ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 61 END ;
- 62 ELSE EXIT ;
- 63 END ;
- 64 Read(c) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 65 END ;
- 66 termCH := c ;
- ***** ^ undeclared identifier
- 67 IF p<SIZE(line) THEN line[p] := CHR(0) END ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 68 Str.Copy(v,line) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 69 END ReadString ;
- ***** ^ not supported yet
- 70
- 71
- 72 PROCEDURE Write ( v : CHAR ) ;
- 73 BEGIN
- 74 IO.WrChar(v) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 75 END Write ;
- ***** ^ not supported yet
- 76
- 77 PROCEDURE WriteLn ;
- 78 BEGIN
- 79 IO.WrLn ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 80 END WriteLn ;
- ***** ^ not supported yet
- 81
- 82 PROCEDURE WriteString ( s : ARRAY OF CHAR ) ;
- ***** ^ not supported yet
- 83 BEGIN
- 84 IO.WrStr(s) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 85 END WriteString ;
- ***** ^ not supported yet
- 86
- 87 BEGIN
- 88 CharBuffered := FALSE ;
- 89 SaveChar := CHR(0) ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 90 END Terminal.
- ***** ^ not supported yet
- 91
- 63 errors
|