[Next] [Previous] [up] [Top] [Contents] [Index]

File compilation example

We'll make a sample program a little bit larger, and then we'll compile it to a file.

Notice that when you type the space after the name of the function "message-dialog", a message appears in the bottom of the Fred window. This message area is called the mini-buffer. When you type an open-parenthesis followed by the name of a function followed by a space, Fred displays the argument list of the function in the mini-buffer.

If you want to see what the function message-dialog does, you can get the documentation string for it. To do this, select the text "message-dialog" in the window, or place the cursor inside the text, and press Control-x Control-d. This is the MCL command for bringing up the documentation window.

Figure 2-7 The documentation window

We've now defined a Lisp function which asks the user for their name, and then displays the name along with a greeting in a dialog box. If we want to use this function in a later Lisp session, we'll need to load it after restarting Lisp. To make that loading faster, we'll compile the file containing the function definition.


Gettmg Started with MCL - 19 OCT 1996
[Next] [Previous] [up] [Top] [Contents] [Index]

Generated with Harlequin WebMaker