blob: f60101d95a1b78c75ff2cc8aa8443c6d7b869bf4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
PACKET basic menu handling
(************************************************************************)
(* *)
(* Basic Menu Handling Version 1.0 *)
(* *)
(* *)
(* Autor : Ingo Siekmann *)
(* Stand : Donnerstag, den 12. Juni 1986 *)
(* *)
(* Lauffähig ab EUMEL Version 1.7.3 *)
(* *)
(* (c) 1986 by ULES c/o Ingo Siekmann & Nils Ehnert *)
(* *)
(************************************************************************)
DEFINES menue monitor :
LET info line x pos = 1 ,
info line y pos = 20 ,
command line x pos = 1 ,
command line y pos = 21 ;
LET first mon line = "----------------------------------------------------------------------------" ,
command line = ">__________________________________________________________________________<" ;
TEXT VAR char ;
PROCEDURE menue monitor (TEXT CONST info line, chars, (* I. Siekmann *)
INT VAR command index) : (* 12.06.1986 *)
enable stop ;
cursor (1, 17) ;
command index := 0 ;
out (first mon line) ;
cursor (info line x pos, info line y pos) ;
out (info line) ;
cursor (command line x pos, command line y pos) ;
out (command line) ;
cursor (command line x pos + 1, command line y pos) ;
REPEAT
(* inchar (char) ; *)
get char (char) ;
command index := pos (chars, char)
UNTIL command index > 0 COR is error END REPEAT ;
out (char) .
END PROCEDURE menue monitor ;
ENDPACKET basic menu handling ;
|