1
<HTML><HEAD><TITLE>Answer to Exercise 3</TITLE></HEAD>
2
<BODY BGCOLOR="#FFFFFF">
3
<TABLE><TR><TD Valign="top"><IMG SRC="../icons/exercise.gif" ALT="??"><TD bgcolor="#FAA89B"><B>ANSWER TO EXERCISE 3</B><TR><TD><TD>
6
Briefly: provide a <TT>GamePreRoutine</TT> which tests to see if
7
<TT>second</TT> is an object, rather than <TT>nothing</TT> or a number. If it is,
8
check whether the object has a <TT>second_before</TT> rule (i.e. test the
9
condition <TT>(object provides second_before)</TT>). If it has, send the
10
<TT>second_before</TT> message to it, and return the reply as the return
11
value from <TT>GamePreRoutine</TT>.
13
<HR>Back to <A HREF="../section9.html#ex3">the exercise in section 9</A><HR>
14
<SMALL><I>Mechanically translated to HTML from third edition as revised 16 May 1997. Copyright © Graham Nelson 1993, 1994, 1995, 1996, 1997: all rights reserved.</I></SMALL></BODY></HTML>