Answer to Exercise 93

| ANSWER TO EXERCISE 93
| First put the directive `Replace DrawStatusLine;` before including the library. Then add the following routine anywhere after `treasures_found`, an 'Advent' variable, is defined:
    [ DrawStatusLine;
       @split_window 1; @set_window 1; @set_cursor 1 1; style reverse;
       spaces (0->33)-1;
       @set_cursor 1 2;  PrintShortName(location);
       if (treasures_found > 0)
       {   @set_cursor 1 50; print "Treasure: ", treasures_found;
       }
       @set_cursor 1 1; style roman; @set_window 0;
    ];

Back to the exercise in section 33

Mechanically translated to HTML from third edition as revised 16 May 1997. Copyright © Graham Nelson 1993, 1994, 1995, 1996, 1997: all rights reserved.