November 2010
Intermediate to advanced
504 pages
12h 45m
English
As the player calls the functions that make up our game, the program will need to track the small and big limits. In order to do this, we’ll need to create two global variables called *small* and *big*.
A variable that is defined globally in Lisp is called a top-level definition. We can create new top-level definitions with the defparameter function:
>(defparameter *small* 1)*SMALL* >(defparameter *big* 100)*BIG*
The function name defparameter is a bit confusing, since it doesn’t really have anything to do with parameters. What it does is let you define a global variable.
The first argument we send to defparameter is the name of the new variable. The asterisks surrounding the ...