![]() ![]() ![]() The easiest option is to escape out of all of your error conditions, right back up to the top. Just like in a debugger, at any break or error condition, you have a bunch of options (like examining the stack, changing what the return value should be, etc.) You can even continue the infinite loop we just broke out of. These conditions can be stacked: if you keep working while in a condition, and then get in another condition and so on, you're piling up conditions on a stack. Kinda like pressing Control-C in a debugger. Similarly, pressing Control-C in Lisp halts whatever is presently running and returns you to the command line.Īfter you press Control-C, the command line changes to a "subsidiary" command line to reflect that you are in a break or error condition. Pressing Control-C in a Unix shell or at a DOS prompt halts the current running process and returns you to the command line. Think of the Lisp command line like the command line in a Unix shell or at a DOS prompt. Here are the command lines in Lispworks and in clisp. Lisp has a command line where you type in things to execute. In the previous examples, the very last line is the command line. +- ooooo 8oooooo ooo8ooo ooooo 8Ĭopyright (c) Bruno Haible, Michael Stoll 1992, 1993Ĭopyright (c) Bruno Haible, Marcus Daniels 1994-1997Ĭopyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998Ĭopyright (c) Bruno Haible, Sam Steingold 1999-2000Ĭopyright (c) Sam Steingold, Bruno Haible 2001-2010 I i i i i i i ooooo o ooooooo ooooo ooooo Loading text file /usr/local/lispworks_6.1/lib/6-1-0-0/private-patches/load.lisp Loading text file /usr/local/lispworks_6.1/lib/6-1-0-0/config/siteinit.lisp LispWorks(R): The Common Lisp Programming EnvironmentĬopyright (C) 1987-2011 LispWorks Ltd. It is mostly in the public domain some portions are provided underīSD-style licenses. SBCL is free software, provided as is, with absolutely no warranty. More information about SBCL is available at. ![]() This is SBCL 1.2.12, an implementation of ANSI Common Lisp. This fires up an implementation of lisp called CLISP. On zeus, you start lisp by typing clisp at the command line. This fires up an implementation of lisp called LispWorks. On osf1 or mason2, you start lisp by typing lisp at the command line. SBCL is a very popular one, and you start it (typically) by typing sbcl on the command line. On your laptop you have several options for running Lisp. If the cell is divided by a line, as is shown at right, then this indicates two different examples. Text shown in red are remarks - do not type them. Text shown in black indicates stuff that is printed back to you. Text shown in blue you are responsible for typing, with a Return at the end of the line. The table cell to the right shows what you type, and the output, for this tutorial. ![]() Notably this tutorial does not teach macros, CLOS, the condition system, much about packages and symbols, or very much I/O. The goal of this tutorial is not to teach you many of those powerful features: rather it's to teach you just enough of Lisp that you can get up and coding quickly if you have a previous background in a procedural language such as C or Java. Lisp is a deep language with many unusual and powerful features. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |