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: ┃ T V

⟦3862592fa⟧ TextFile

    Length: 1958 (0x7a6)
    Types: TextFile
    Names: »V«

Derivation

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

TextFile

WITH Messages;
WITH List_Generic;

PACKAGE Mailboxes IS

   -- This package defines an abstraction for defining and manipulating
   -- mailboxes that contain messages.


   SUBTYPE Sequence_Number IS Natural;
   -- A way to refer to a message in a mailbox by indicating its position.

   TYPE Mailbox IS PRIVATE;


   FUNCTION Make RETURN Mailbox;
   -- Returns an empty mailbox.

   PROCEDURE Add (Message : Messages.Message; The_Mailbox : IN OUT Mailbox);
   -- Adds a message to the end of a mailbox.  The "Read" flag for the new
   -- message is set to False.


   FUNCTION Last_Message (The_Mailbox : Mailbox) RETURN Sequence_Number;
   -- Returns the index of the last message in the mailbox.  0 iff no messages.


   FUNCTION Get_Message (Message : Sequence_Number; The_Mailbox : Mailbox)
                        RETURN Messages.Message;
   -- Returns the indicated message from the mailbox.


   FUNCTION Get_Read_Flag (Message : Sequence_Number; The_Mailbox : Mailbox)
                          RETURN Boolean;
   -- Returns the value of the "Read" flag from the indicated message.

   PROCEDURE Set_Read_Flag (Message     :        Sequence_Number;
                            New_Value   :        Boolean;
                            The_Mailbox : IN OUT Mailbox);
   -- Sets the "Read" flag for the indicated message to the value supplied.


   PROCEDURE Delete_Message (Message     :        Sequence_Number;
                             The_Mailbox : IN OUT Mailbox);
   -- Deletes the indicated message from the mailbox.


   Nonexistent_Sequence_Number : EXCEPTION;
   -- Raised if the Sequence_Number supplied to any of the above operations
   -- is > the number of messages in the mailbox.


PRIVATE
   TYPE Mailbox_Entry IS
      RECORD
         Read_Flag : Boolean;
         Message   : Messages.Message;
      END RECORD;
   PACKAGE Mailbox_List IS NEW List_Generic (Mailbox_Entry);
   TYPE Mailbox IS NEW Mailbox_List.List;
END Mailboxes;