DataMuseum.dk

Presents historical artifacts from the history of:

RegneCentralen RC759 "Piccoline"

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RegneCentralen RC759 "Piccoline"

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦f515b0383⟧ TextFile

    Length: 1280 (0x500)
    Types: TextFile
    Names: »DB/OPRET«

Derivation

└─⟦eca9022c5⟧ Bits:30002661 Datalære sådan - løsningsdiskette
    └─ ⟦this⟧ »DB/OPRET« 

TextFile

1500 PROC opret(filnavn$) CLOSED
1510   CLOSE  // lukker eventuelt fejlagtigt åbne filer«nul»
1520   IMPORT antalfelter,postlængde,antalposter,feltnavne$
1530   CLEAR 
1540   INPUT "hvor mange felter i en post: ": antalfelter
1550   postlængde:= 25*antalfelter
1560   DIM postindhold$(antalfelter) OF 25,post$ OF postlængde
1570   DIM felter$ OF 8*antalfelter
1580   felter$:= ""
1590   post$:= ""
1600   FOR i:= 1 TO antalfelter DO
1610     PRINT "navn på felt nr ";i;" (max 8 tegn)";
1620     INPUT ":": feltnavne$(i)
1630     t:= LEN(feltnavne$(i))+1
1640     FOR l:= t TO 8 DO feltnavne$(i)(l:l):= " "
1650     felter$:= felter$+feltnavne$(i)
1660     postindhold$(i):= "                         "
1670     post$:= post$+postindhold$(i)
1680   NEXT i
1690   CREATE filnavn$+".RAN",(postlængde*101) DIV 1024+1
1700   CREATE filnavn$+".def",1
1710   OPEN FILE 1,filnavn$+".RAN", RANDOM postlængde+2
1720   OPEN FILE 2,filnavn$+".DEF", RANDOM 90
1730   WRITE FILE 2,1: antalfelter,felter$
1740   FOR i:= 1 TO 100 DO
1750     WRITE FILE 1,i: post$
1760   NEXT i
1770   WRITE FILE 1,101: antalposter
1780   CLOSE 
1790 ENDPROC opret
«eof»