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

⟦0d6609eed⟧ TextFile

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

Derivation

└─⟦621cfb9a2⟧ Bits:30002817 RC8000 Dump tape fra HCØ.  Detaljer om "HC8000" projekt.
    └─⟦0364f57e3⟧ 
        └─⟦this⟧ »convpas1« 
└─⟦667bb35d6⟧ Bits:30007480 RC8000 Dump tape fra HCØ.
    └─⟦4334b4c0b⟧ 
        └─⟦this⟧ »convpas1« 

TextFile

begin
integer tegn,next_tegn,prev_tegn,file_index,
        tegn_index,consttype,typetype,vartype,valuetype,
        proctype,present_index,present_type,i;

integer array comparray(1:5,0:9);

zone array z(5,128,1,stderror);
integer array readarray(0:10);

procedure readtext;
begin
integer i;
for i:= 1 step 1 until 10 do readarray(i):=32;

i:=0;
repeat
i:=i+1;
readchar(in,tegn);
readarray(i) := tegn;
until tegn < 'a' or tegn > 'z' or i = 10;
repeatchar(in);     
readarray(0):=i-1;
end readtext;




procedure outtext;
begin
integer i;
for i:=1 step 1 until readarray(0) do
  outchar(z(present_index),readarray(i));
end outtext;
boolean procedure compare(index);
value index; integer index;
begin
integer i;
if readarray(0) = comparray(index,0) then
  begin
  for i:= 1 step 1 until comparray(index,0) do
    begin
    if comparray(index,i) = readarray(i) then compare := true
     else compare := false;
    end;
  end else compare := false;
<* test  *>
write(out,"nl",1,readarray(0));
for i:=1 step 1 until readarray(0) do outchar(out,readarray(i));
outchar(out,10);
write(out,comparray(index,0));
for i:=1 step 1 until comparray(index,0) do outchar(out,comparray(index,i));
<* end test *>
end compare;

consttype := 1; typetype := 2;
vartype := 3; valuetype :=4; proctype := 5;
present_type := const_type;


open(z(consttype),4,<:constfil:>,0);
open(z(typetype),4,<:typefil:>,0);
open(z(vartype),4,<:varfil:>,0);
open(z(valuetype),4,<:valuefil:>,0);
open(z(proctype),4,<:procfil:>,0);


for i:=0 step 1 until 5 do
comparray(consttype,i) := case i+1 of (5,'c','o','n','s','t');

for i:=0 step 1 until 4 do
comparray(typetype,i) := case i+1 of (4,'t','y','p','e');

for i:= 0 step 1 until 3 do
comparray(vartype,i) := case i+1 of (3,'v','a','r');

for i:=0 step 1 until 5 do
comparray(valuetype,i) := case i+1 of (5,'v','a','l','u','e');

for i := 0 step 1 until 9 do
comparray(proctype,i) := case i+1 of (9,'p','r','o','c','e','d','u','r','e');
prev_tegn := 'sp';
present_index := const_type;

repeat
  readchar(in,tegn);
   if ( tegn = 'c'  or tegn = 'p' or tegn ='t'
       or tegn = 'v' ) and prev_tegn = ';' then
    begin
    repeatchar(in);
    readtext;
    if compare(consttype) then present_index := consttype

   else
   if compare(typetype) then present_index := typetype
   else
   if compare(vartype) then present_index := vartype
   else

   if compare(valuetype) then present_index := valuetype
   else
   if compare(proctype) then present_index := proctype;
       outtext;
   end else outchar(z(present_index),tegn);
 if tegn <> 'sp' and tegn <> 'nl' then prev_tegn := tegn;
 until tegn = 'em';
for i:=1 step 1 until 5 do
 outchar(z(i),'em');

for i:= 1 step 1 until 5 do close(z(i),true);
end;
▶EOF◀