|
DataMuseum.dkPresents historical artifacts from the history of: Jet Computer Jet80 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Jet Computer Jet80 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 1024 (0x400) Types: TextFile Names: »FILKOPI.PAS«
└─⟦092727b26⟧ Bits:30005927 Demoprogrammer til Pascal bog (Jet-80) └─ ⟦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»