-- UserProfile.mesa; Edited by McGregor on 18-Oct-81 12:53:09 DIRECTORY Rope USING [Ref]; UserProfile: DEFINITIONS = BEGIN -- UserProfile is a package to read information from the disk file -- "User.profile". Entries in the profile are of the form: -- : -- The three routines below read simple results from the value -- field given a key. The default is exposed so that you can set what the -- procedure returns should the value is absent or malformed. -- Note that each call on the routines below will open User.profile, read the -- file and then close it again. If you plan to read more than one value -- and care about efficiency, use the Open and Close commands to keep the -- file open between calls. Boolean: PROC [key: Rope.Ref, default: BOOLEAN _ FALSE] RETURNS [value: BOOLEAN] ; Number: PROC [key: Rope.Ref, default: LONG INTEGER _ 0] RETURNS [value: LONG INTEGER] ; String: PROC [key: Rope.Ref, default: Rope.Ref _ NIL] RETURNS [value: Rope.Ref] ; Open: PROC ; -- holds User.profile open until Close Close: PROC ; END.