DataMuseum.dk

Presents historical artifacts from the history of:

RC4000/8000/9000

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

See our Wiki for more about RC4000/8000/9000

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦33bfc0f14⟧ TextFile

    Length: 3072 (0xc00)
    Types: TextFile
    Names: »tprintpass1«

Derivation

└─⟦2c55ea56f⟧ Bits:30001844 SW-save af projekt 1000, Alarm-system
    └─⟦6b41451d2⟧ 
        └─⟦this⟧ »tprintpass1« 

TextFile

program testout(output, testin,convfil); 
label 5; 
type 
$
codeindex = 0..$
var 
textcodes : array ÆcodeindexÅ of alfa; 
convcodes : array ÆcodeindexÅ of codes; 
convfil : text;
testin : file of integer; 
actcode : codes; 
first : boolean; 
decl, spix, intcode, sort : integer; 
value 
textcodes = ( $ 
begin (* main program *) 
open(convfil, 'convfil'); rewrite(convfil);
writeln(convfil,nl, 'ord(code) code ', nl, nl);
first := true; 
for actcode := cnocode to clastcode do 
begin
convcodesÆord(actcode)Å := actcode; 
writeln(convfil, ord(actcode):3, ' = ', textcodes Æ ord(actcode) Å );
end;
close(convfil);

5: if first then open(testin,"pass1code") 
else open(testin,"pass1labels"); 
reset(testin); 
while not eof(testin) do 
begin read(testin, intcode); 
case convcodesÆintcodeÅ of 

cliteral: begin 
read(testin, intcode, sort); 
write("literal( ", textcodesÆintcodeÅ:8, sort:2," )"); 
for spix := 1 to sort do 
begin read(testin,decl); write(chr(decl)); end; 
writeln;
end;

ccodeline: begin
read(testin, sort);
write('codeline ( ', sort : 1, ' ): ');
for sort := sort downto 1 do
begin
read(testin, decl); write(chr( decl ) );
end;
writeln;
end;

ccontext,cfield, cid, ctypeid: begin read(testin,spix); 
writeln(textcodesÆintcodeÅ:7,"( ",spix:2," )"); 
end; 

cdeclaration: begin read(testin, intcode); 
writeln("declaration( ", textcodesÆintcodeÅ:10,") "); 
end; 
cdeclarelist, cdeclare: begin 
read(testin,spix); 
writeln(textcodesÆintcodeÅ,"( ",spix:3," )"); end; 

clabeldef: begin 
read(testin, sort, spix); 
writeln( "labeldef( ",sort:2,spix:4," )"); 
end; 

cstartlabelscope,cendlabelscope: begin 
read(testin,decl); 
writeln(textcodesÆintcodeÅ,"( ",decl:3," )");  
end;

cnewline: begin 
read(testin, sort); 
writeln( "newline( ", sort:2, " )"); 
end; 

coption: begin
read(testin, spix, sort, intcode);
writeln("option ( ", spix:3, sort:3, intcode:3, " )");
end;

cstandardname: begin 
read(testin, spix, intcode); 
writeln("standardname( ",spix:3," ",textcodesÆintcodeÅ,")");
end; 

cnewtype: begin read(testin, intcode); 
writeln("newtype( ", textcodesÆintcodeÅ, ")" ); end; 

end (*case *) 

otherwise writeln(textcodesÆintcodeÅ); 

end; (* while *) 

if first then begin first := false; 
page(output); goto 5; end; 

end. 

$ $ $
▶EOF◀