DIRECTORY BluejayUtils, Commander USING [CommandProc, Register], IO USING [card, PutF]; TuneStorage: CEDAR PROGRAM IMPORTS BluejayUtils, Commander, IO ~ BEGIN vfileTotalSpace: CARD _ 0; maxVFID: CARD _ 1000; AnalyzeTunes: Commander.CommandProc = { exists: BOOL; size: INT; num: CARD _ 0; FOR tid: CARD IN [0..maxVFID] DO [exists, size] _ BluejayUtils.DescribeTune[tid]; IF exists THEN { vfileTotalSpace _ vfileTotalSpace + size; num _ num + 1; }; ENDLOOP; IO.PutF[cmd.out, "Total # of tunes = %g\n", IO.card[num]]; IO.PutF[cmd.out, "Total length of tunes (in chirps) = %g\n", IO.card[vfileTotalSpace]]; }; Commander.Register[key: "TuneStorage", proc: AnalyzeTunes, doc: "Computes total tune storage."]; END. †TuneStorage.mesa Copyright Σ 1987 by Xerox Corporation. All rights reserved. Doug Terry, August 3, 1987 1:39:39 pm PDT Computes tune storage. [cmd: Commander.Handle] RETURNS [result: REF ANY _ NIL, msg: ROPE _ NIL] Enumerates the the jukebox and computes total tune length. BluejayUtilsRpcControl.ImportInterface[interfaceName: [type: "BluejayUtils", instance: "Strowger.lark"]]; Κ`˜codešœ™Kšœ<™