|
|
DataMuseum.dkPresents historical artifacts from the history of: RC4000/8000/9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC4000/8000/9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 3072 (0xc00)
Types: TextFile
Names: »tnextparam«
└─⟦00964e8f7⟧ Bits:30007478 RC8000 Dump tape fra HCØ.
└─⟦b2ec5d50f⟧
└─⟦this⟧ »tnextparam«
<*nextparam 1981.11.17 Anders Lindgård*>
procedure init_alf(chartable);
integer array chartable;
begin
integer i;
<*convert all capital letters to small*>
for i:=0 step 1 until 255 do chartable(i):=0;
for i:='a' step 1 until 'å' do chartable(i):=6 shift 12+i;
for i:='A' step 1 until 95 do chartable(i):=chartable(i+32);
chartable('sp'):=7 shift 12+'sp';
for i:='.','/',':' do chartable(i):=7 shift 12+'.';
for i:='!' step 1 until '*',';' step 1 until 63,96,126,127 do
chartable(i):=9 shift 12+i;
chartable(',') :=7 shift 12+ ',';
chartable('nl'):=8 shift 12+'nl';
chartable('em'):=8 shift 12+'em';
for i:=0 step 1 until 9 do chartable('0'+i):=2 shift 12+('0'+i);
for i:=0,2 do chartable('+'+i):=3 shift 12+('+'+i);
tableindex:=0;
intable(chartable);
end initalf;
integer procedure nextparam(c_buffer,name,int,del);
integer int,del;
long array name;
zone c_buffer;
begin
integer c,char,i;
<* value of nextparam
-1 syntax error
0 end of list
1 <name>
2 <integer>
5 <name>.
6 <integer>.
*>
del:='em';
nextparam:=-1;
for c:=readchar(c_buffer,char) while char='sp' do;
if c<>8 then repeatchar(c_buffer);
if char=',' then <*skip until 'nl'*>
begin
for c:=readchar(c_buffer,char) while c<>8 do;
c:=readchar(c_buffer,char);
repeatchar(c_buffer);
end;
if c=8 then
begin
del:=char;
nextparam:=0;
end else
if c<7 then
begin
if c=6 then
begin
<*name*>
name(1):=name(2):=0;
i:=readstring(c_buffer,name,1);
if i>0 then nextparam:=1;
repeatchar(c_buffer);
for c:=readchar(c_buffer,char) while char='sp' do;
if c<=6 then repeatchar(c_buffer);
del:=if c<=6 then 'sp' else char;
if del=',' then
begin
for c:=readchar(c_buffer,char) while c<>8 do;
if char<>'nl' then repeatchar(c_buffer);
del:='sp';
end else
if c=8 then repeatchar(c_buffer);
if del='.' and i>0 then nextparam:=5;
end else
if c>1 and c<6 then
begin
<*integer*>
i:=read(c_buffer,int);
if i=1 and int<max_integer then
begin
repeatchar(c_buffer);
for c:=readchar(c_buffer,char) while char='sp' do;
if c<=6 then repeatchar(c_buffer);
del:=if c<=6 then 'sp' else char;
if del=',' then
begin
for c:=readchar(c_buffer,char) while c<>8 do;
if char<>'nl' then repeatchar(c_buffer);
del:='sp';
end else
if c=8 then repeatchar(c_buffer);
nextparam:=if del<>46 then 2 else 6;
end legal integer;
end integer;
end legal item else
for c:=readchar(cbuffer,char) while c<>8 do;
end nextparam;
▶EOF◀