DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ I T

⟦783876ed1⟧ TextFile

    Length: 2329 (0x919)
    Types: TextFile
    Names: »INSTANCECOUNTE«

Derivation

└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦this⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with expertSystem ; use expertSystem;

package instanceCounter is

    function newObject                           return long_integer;
    function newClass      ( name : className)   return positive;
    function newContext    ( name : contextName) return positive;
    function contextNumber ( name : contextName) return natural;
    function unknownClassName ( number : natural ) return className;

end instanceCounter;

package body instanceCounter is

   numObject  : long_integer := 0;

   sizeClass  : constant positive := className'LENGTH;
   numClass   : natural  := 0;
   namesClass : array(1..30) of string(1..sizeClass);


   sizeContext  : constant positive := contextName'LENGTH;
   numContext   : natural  := 0;
   namesContext : array(1..30) of string(1..sizeContext);

   function newObject return long_integer is
   begin
     numObject := numObject + 1;
     return numObject;
   end newObject;

   function newClass(name : className) return positive is
   ln    : positive := 1;
   aName : string(1..sizeClass);
   begin
      numClass := numClass + 1;
      if name'LENGTH > sizeClass then
         ln := sizeClass;
      else
         ln := name'LENGTH;
      end if;
      aName(1..ln) := name(1..ln);
      ln := ln + 1;
      while ln <= sizeClass loop
         aName(ln) := ' ';
         ln := ln + 1;
      end loop;
      namesClass(numClass):=aName;
      return numClass;
   end newClass;

   function newContext(name : contextName) return positive is
   ln    : positive := 1;
   aName : string(1..sizeContext);
   begin
      numContext := numContext + 1;
      if name'LENGTH > sizeContext then
         ln := sizeContext;
      else
         ln := name'LENGTH;
      end if;
      aName(1..ln) := name(1..ln);
      ln := ln + 1;
      while ln <= sizeContext loop
         aName(ln) := ' ';
         ln := ln + 1;
      end loop;
      namesContext(numContext):=aName;
      return numContext;
   end newContext;

   function contextNumber ( name : contextName) return natural is
   begin
      for i in 1..numContext loop
	if name = namesContext(i) then
	  return(i);
	end if;
      end loop;
      return(0);
   end contextNumber; 

   function unknownClassName(number : natural) return className is
   begin
        return namesClass(number);
   end unknownClassname;

end instanceCounter;