oberon index <- ^ -> mail ?
Davor: Definition des Moduls Shards, darüber: Autorisierungsprotokolle / Programmierung

Realisierung der Funktion Shards.Fits


   TYPE
      SuperLid = POINTER TO SuperLidRec;
      SuperLidRec =
         RECORD
            (LidRec)
            lid1,
            lid2: Lid;
         END;

   (* ... *)

   PROCEDURE Fits(pot: Pot; lid: Lid): BOOLEAN;
      VAR
         result: BOOLEAN;
   BEGIN
      IF pot.busy THEN
         RETURN FALSE           (* cyclic call? *)
      END;
      IF (lid # NIL) & (lid IS SuperLid) THEN
         WITH lid: SuperLid DO
            result := Fits(pot, lid.lid1) OR Fits(pot, lid.lid2);
         END;
      ELSE
         IF lid = NIL THEN
            lid := nilLid;
         END;
         pot.busy := TRUE;
         result := pot.if.fits(pot, lid);
         pot.busy := FALSE;
      END;
      RETURN result
   END Fits;


oberon index <- ^ -> mail ?
Davor: Definition des Moduls Shards, darüber: Autorisierungsprotokolle / Programmierung
Martin Hasch, Oct 1996