|
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: 1024 (0x400) Types: TextFile Names: »FILKOPI.PAS«
└─⟦08ea08c61⟧ Bits:30003924 PolyPascal programmer └─ ⟦this⟧ »FILKOPI.PAS« └─⟦092727b26⟧ Bits:30005927 Demoprogrammer til Pascal bog (Jet-80) └─ ⟦this⟧ »FILKOPI.PAS« └─⟦3702e543b⟧ Bits:30003064 Demoprogrammer A-J til Pascal bog └─ ⟦this⟧ »FILKOPI.PAS« └─⟦f983c2ef3⟧ Bits:30004681 Pascal opgaver (Butler) └─ ⟦this⟧ »FILKOPI.PAS«
PROGRAM filkopi; TYPE buffertype = ARRAY(.1 .. 12800.) OF CHAR; str14 = STRING(.14.); VAR buffer : buffertype; indnavn, udnavn : str14; indfil, udfil : FILE; i, laengde : INTEGER; BEGIN WRITE(CLRHOM); WRITE('Hvilken fil skal kopieres: '); READLN(indnavn); WRITE('Hvad skal kopien hedde: '); READLN(udnavn); ASSIGN(indfil, indnavn); ASSIGN(udfil, udnavn); RESET(indfil); REWRITE(udfil); laengde := LENGTH(indfil); i := 0; IF laengde >= 100 THEN BEGIN REPEAT BLOCKREAD(indfil, buffer, 100); BLOCKWRITE(udfil, buffer, 100); i := i + 100; UNTIL (laengde - i) < 100; END; IF (laengde - i) > 0 THEN BEGIN BLOCKREAD(indfil, buffer, laengde - i); BLOCKWRITE(udfil, buffer, laengde - i); END; CLOSE(indfil); CLOSE(udfil); END. «eof»