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

⟦ba0db8f00⟧ TextFile

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

Derivation

└─⟦621cfb9a2⟧ Bits:30002817 RC8000 Dump tape fra HCØ.  Detaljer om "HC8000" projekt.
    └─⟦0364f57e3⟧ 
        └─⟦bf33d74f6⟧ »iogeofile« 
└─⟦00964e8f7⟧ Bits:30007478 RC8000 Dump tape fra HCØ.
    └─⟦b2ec5d50f⟧ 
        └─⟦bf33d74f6⟧ »iogeofile« 
            └─⟦this⟧ 

TextFile



;       in_add_pch_tx         * page 1   13 09 77, 10.28;  

;  in_add_pch
;  **********

if listing.yes
char 10 12 10

in_add_pch = set 1 disc

in_add_pch = algol

external integer procedure in_add_pch(z, a, i, sum, tch, tcl, tv);  
__________________________________________________________________
zone               z;  
long array         a;  
integer            i;  
long               sum;  
integer            tch, 
_                  tcl;  
long               tv;  

comment  in_add_pch is intended  for input of long number strings
in one call.  input  continues as long as numbers are  terminated
by c or nl, while all other termination produces an exit from the
procedure.  all numbers  terminated by  c or nl  are added to the 
parameter sum, and are also placed  in the array  a from index i 
and onwards.  exit is also  produced when the  array is full. the 
number of c- or nl-terminated  elements is given as the procedure
value.  a c  without preceeding  digits produces also an exit, as 
it is an illegal  input for the central  reading  procedure read_
add_pch, but the terminator class then is 7 (illeg. terminator).

in_add_pch          return            integer
the number of c- or nl-terminated numbers input in the actual call

a                   return            long array
the c- or nl-terminated numbers are stored in the array from
index i. 

i                   call and return   integer
the index of the first free element both at call and return. if i
is outside the limits of the array a, an exit occurs with procedure
value = 0, i.e. no elements input, even in the case of other legal
or illegal terminators. the terminator class is then = 9.

sum                 call and return   long
all c- or nl-terminated elements are added with sign to sum.

tch                 return             integer
the isovalue of the terminator character.

tcl                 return             integer
the class of the terminating input number. class values are
a=1, b=2, c or nl=3, d=4, e=5, f=6, others=7, em=8, no input=9 (see i)

tv                  return             long
the value of the last number input;  

\f



comment in_add_pch_tx         * page 2   13 09 77, 10.28
0 1 2 3 4 5 6 7 8 9 ;  

begin

  integer            class, 
  _                  char, 
  _                  i0, 
  _                  imax, 
  _                  t;  

  long               v;  

  i0:=i;  

  if system(3, imax, a)<=i0 and i0<=imax then
  begin

    for t:=0, class while class=3 and i<=imax do
    begin
      class:=read_add_pch(z, v, char);  
      if class=3 then
      begin a(i):=v;  i:=i+1;  sum:=sum+v;  end;  
    end;  

    tch:=char;  tcl:=class;  tv:=v;  

  end

  else tcl:=9;  

  i0:=i-i0;  

  in_add_pch:=if i<=imax then i0 else (-i0);  

end in add pch;  

end

if warning.yes
(mode 0.yes
message in_add_pch not ok
lookup in_add_pch)
▶EOF◀