summaryrefslogtreecommitdiff
path: root/system/std.zusatz/1.7.3/src/17CHARS.ELA
blob: 160997a04f4c1508130ef0613ca4948b79b19bd9 (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
PACKET special 17 chars DEFINES chars 17 :

TEXT VAR rec , schar ;
FILE VAR f ;

PROC chars 17 :

  REP
    down ("""") ;
    get schar ;
  UNTIL perhaps schar ("225", "217")
    COR perhaps schar ("239", "218")
    COR perhaps schar ("245", "219")
    COR perhaps schar ("193", "214")
    COR perhaps schar ("207", "215")
    COR perhaps schar ("213", "216")
    COR perhaps schar ("235", "220")
    COR perhaps schar ("173", "221")
    COR perhaps schar ("163", "222")
    COR perhaps schar ("160", "223")
    COR perhaps schar ("194", "251")
    COR eof
  PER ;
  zeile neu .

get schar :
  f := editfile ;
  read record (f, rec) ;
  schar := subtext (rec, col + 1, col + 3) .

ENDPROC chars 17 ;

BOOL PROC perhaps schar (TEXT CONST old, new) :

  IF schar = old
    THEN change (rec, col + 4, col + 3, new) ;
         write record (f, rec) ;
         TRUE
    ELSE FALSE
  FI .

ENDPROC perhaps schar ;

ENDPACKET special 17 chars ;