|
|
DataMuseum.dkPresents historical artifacts from the history of: RC3500 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC3500 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 3072 (0xc00)
Types: TextFileVerbose
Names: »tprintpass1«
└─⟦2c55ea56f⟧ Bits:30001844 SW-save af projekt 1000, Alarm-system
└─⟦6b41451d2⟧
└─⟦this⟧ »tprintpass1«
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»