|
DataMuseum.dkPresents historical artifacts from the history of: CP/M |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about CP/M Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 1536 (0x600) Types: TextFile Names: »AEOEAA.PAS«
└─⟦08ea08c61⟧ Bits:30003924 PolyPascal programmer └─ ⟦this⟧ »AEOEAA.PAS« └─⟦092727b26⟧ Bits:30005927 Demoprogrammer til Pascal bog (Jet-80) └─ ⟦this⟧ »AEOEAA.PAS« └─⟦3702e543b⟧ Bits:30003064 Demoprogrammer A-J til Pascal bog └─ ⟦this⟧ »AEOEAA.PAS« └─⟦f983c2ef3⟧ Bits:30004681 Pascal opgaver (Butler) └─ ⟦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»