<> <> <> <> <> <<<< Overview:>> <<>> <> <<>> < cannot be <2>." Possible arguments for <1> would be "file drawer" and "folder". The Expand operation is used to form the desired message, given the message template and an array containing the required number of arguments. The array of string arguments should be arranged in an order corresponding to the diamonds they replace, i.e. <1> will be replaced with array[0], <2> with array[1], etc. >> <<>> <> <<>> <> <<>> <>>> DIRECTORY NSString USING [String], Rope USING [ROPE], XMessage USING [MsgID, MsgType]; Message: CEDAR DEFINITIONS = BEGIN <<-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- >> <> <<-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- >> Services: TYPE = -- One for each range of messages, used by Message/XMessage layering implementation { scs, -- Services Common Software chs, -- Clearinghouse Service ecs, -- External Commmunication Service fs, -- File Service gws, -- Gateway Service irs, -- Internetwork Router Service its, -- Interactive Terminal Service ps, -- Print Service ms, -- Mail Service mch, -- MCH common rbs, -- Remote Batch Service svm, -- Server Monitor grtr, -- TTY Greeter cmsv, -- Communication Services Area distr, -- Distributed Services area basic, --Basic Services area rxdev}; -- Rank Xerox development Msgkey: TYPE = CARDINAL; MsgkeyList: TYPE = RECORD [ data: SEQUENCE length: CARDINAL OF Msgkey]; StringArray: TYPE = RECORD [ data: SEQUENCE length: CARDINAL OF NSString.String]; Messages: TYPE = RECORD [ data: SEQUENCE length: CARDINAL OF MsgEntry]; <> MsgEntry: TYPE = RECORD [ msgKey: Msgkey, -- runtime mesage access handle msg: NSString.String, -- message body translationNote: NSString.String _ NIL, -- special instructions to the translators translatable: BOOLEAN _ TRUE, -- IF FALSE do not translate type: XMessage.MsgType _ userMsg, -- assertion as to who the client is id: XMessage.MsgID]; -- unique handle for the life time of message]; <<-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- >> <> <<-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- >> Error: ERROR [type: ErrorType]; ErrorType: TYPE = {arrayMismatch, invalidMsgkeyList, invalidStringArray, invalidString, notEnoughArguments}; <<-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- >> <> <<-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- >> <> Get: PROCEDURE [msgkey: Msgkey] RETURNS [msg: NSString.String]; <> GetList: PROCEDURE [msgkeys: REF MsgkeyList, msgs: REF StringArray]; <> GetTime: PROCEDURE [] RETURNS [msg: NSString.String]; <> <> Expand: PROCEDURE [source: NSString.String, args: REF StringArray] RETURNS [msg: NSString.String]; <> <> SetMsgfile: PROCEDURE [file: Rope.ROPE, offset: CARDINAL _ 0]; <> <> SetMessages: PROCEDURE [messages: REF Messages]; <> <> UnloadMessages: PROCEDURE [service: Services]; <> END. -- of Message LOG ( time - person - action ) 21-Jan-82 12:11:36 - CKabcenell - Created. 1-Feb-82 10:32:28 - CKabcenell - Redefined Messages TYPE. 12-Feb-82 17:25:51 - CKabcenell - Redefined SetMsgfile. 9-Jun-82 10:08:07 - CKabcenell - Converted to Filing 5.0. - - - - Services 8.0 - - - - 2-Aug-83 10:07:06 - Ciccone - Replaced File.Capability with File.File for Klamath. 27-Oct-83 15:59:49 - McManis - Added zone parameter to Expand and GetTime - - - - Services 10.0 - - - - 9-Apr-85 9:37:04 - Balcon - Added XMessage required changes, redefined MsgEntry, redefined SetMsgfile, added UnloadMessages 29-Apr-85 15:49:27 - McManis - Changed SetMsgfile back to previous definition. Fixed up comments.