This assignment adds no new features, but rather goes back and re-plows old ground.
In the dequeue assignment you added the order command toreadmbox
to re-arrange the messages in the message list. Currently, the order command has two forms:to order messages according to the appearance oforder
label wordword
in header fields, andorderto re-establish the original message order. In this assignment you'll add a third format for the order command.The new order command format is
The one-argument form of the order command searches the entire message header for occurrences of word, and then orders the messages according to the number of occurrences of word each message contains in its header. Messages are placed in descending order on the number of occurrences of word in each header; messages having the same number of occurrences maintain their relative order in the new message list.order
wordFor example, suppose the message list is
1:0 2:2 3:4 4:0 5:1 6:1where i:j indicates that message i contains j occurrences of word. Then the order commandwould re-order the message list toorder
word3:4 2:2 5:1 6:1 1:0 4:0Note the old messages 5 and 6 both have one occurrence of word in their header and they maintain their relative order in the new message list.This assignment does not change the behavior of the order command when it has zero or two arguments; this assignment just adds a new behavior when the order command has one argument.
This page last modified on 18 July 2000.