|
|
DataMuseum.dkPresents historical artifacts from the history of: RegneCentralen RC700 "Piccolo" |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RegneCentralen RC700 "Piccolo" Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 1536 (0x600)
Types: TextFile
Names: »AEOEAA.PAS«
└─⟦3702e543b⟧ Bits:30003064 Demoprogrammer A-J til Pascal bog
└─⟦this⟧ »AEOEAA.PAS«
PROGRAM aeoeaa;
TYPE
str80 = STRING(.80.);
str14 = STRING(.14.);
str2 = STRING(.2.);
VAR
indfil, udfil : TEXT;
linie : str80;
indnavn, udnavn : str14;
delstreng : str2;
ch : CHAR;
i : INTEGER;
PROCEDURE udskift(VAR streng : str80; ind : CHAR; position : INTEGER);
BEGIN (* udskift *)
DELETE(streng, position, 2);
INSERT(ind, streng, position);
END; (* udskift *)
BEGIN
WRITE(CLRHOM);
WRITE('Hvilken tekstfil skal rettes: '); READLN(indnavn);
WRITE('Hvad skal den rettede fil hedde: '); READLN(udnavn);
ASSIGN(indfil, indnavn);
ASSIGN(udfil, udnavn);
RESET(indfil);
REWRITE(udfil);
WHILE NOT EOF(indfil) DO
BEGIN
linie := '';
WHILE NOT EOLN(indfil) DO
BEGIN
READ(indfil, ch);
linie := linie + ch;
END;
READLN(indfil);
FOR i := 1 TO LEN(linie) - 1 DO
BEGIN
delstreng := COPY(linie, i, 2);
IF delstreng = 'ae'
THEN udskift(linie, 'æ', i)
ELSE IF delstreng = 'oe'
THEN udskift(linie, 'ø', i)
ELSE IF delstreng = 'aa'
THEN udskift(linie, 'å', i);
END;
FOR i := 1 TO LEN(linie) DO
WRITE(udfil, linie(.i.));
WRITELN(udfil);
END;
CLOSE(indfil);
CLOSE(udfil);
END.
«eof»