~ubuntu-branches/ubuntu/hoary/inform/hoary

« back to all changes in this revision

Viewing changes to html/answers1/answer3.html

  • Committer: Bazaar Package Importer
  • Author(s): Mark Baker
  • Date: 2004-03-29 23:52:44 UTC
  • Revision ID: james.westby@ubuntu.com-20040329235244-fox1z1yv7d6vojoo
Tags: upstream-6.30
ImportĀ upstreamĀ versionĀ 6.30

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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>
 
4
<P>
 
5
 
 
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>.
 
12
</TABLE>
 
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 &#169; Graham Nelson 1993, 1994, 1995, 1996, 1997: all rights reserved.</I></SMALL></BODY></HTML>