<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<HTML>
 <HEAD>
  <link rel="icon"          href="/favicon.ico" type="image/x-icon">
  <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
  <link rel="stylesheet"    href="../../../../../../default.css"  type="text/css">

  <TITLE>A Quick, Dirty and Ugly BASIC implemented in Common Lisp</TITLE>

  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
  <META HTTP-EQUIV="Description"
        NAME="description" CONTENT="BASIC in Common Lisp">
  <META NAME="author"      CONTENT="Pascal J. Bourguignon">

  <META NAME="keywords"    CONTENT="BASIC, Common Lisp, Lisp">
 </HEAD>
<BODY>
<!--TOP-BEGIN-->
<!-- This section is automatically generated by html-update, -->
<!-- from data in 'node.el'.    Please, do not edit it here. -->
<DIV CLASS="TOP"></DIV>
<!--TOP-END-->
<!--MENU-BEGIN-->
<!-- This section is automatically generated by html-update, -->
<!-- from data in 'node.el'.    Please, do not edit it here. -->
<DIV CLASS="MENU"><HR><P>|
 <A HREF="../../../../../../toc.html">Contents</a> |
 <A HREF="../../../../../../index.html">Home</a> |
 <A HREF="../sudoku-solver/index.html.in">Previous</a> |
 <A HREF="../index.html.in">Up</a> |
 <A HREF="../brainfuck/index.html.in">Next</a> |
</P><HR></DIV>
<!--MENU-END-->

<H1>BASIC</H1>
<H2>A Quick, Dirty and Ugly Basic interpreter</H2>
<p>This is a silly BASIC interpreter.
<p>The lines are tokenized and stored
   as-is in an array indexed by the line number.  When interpreting the
   program, the instructions are parsed directly from there ; the
   expressions are parsed into trees which are then evaluated.</p>

<p> The variables are stored into a hash table indexed by their
   identifier (symbol). Undefined variables are taken as 0 or "".</p>

<p> We distinguish number and string variables depending on the presence
   of a '$' character in the last position of the variable identifier.
<p> Variables are reset by the command RUN. (A program can be restarted
   without losing the variable using the GOTO or GOSUB statements).
   Commands are not distinguished from statements and may occur in a
   program. In particular, LOAD could be used to load a subprogram
   overlay, and takes a line number where to jump to. </p>
<p> Programs are loaded and saved in source form.</P>

<UL>
<LI><A HREF="basic.lisp">basic.lisp</A></LI>
<LI><A HREF="test1.basic">test1.basic</A></LI>
<LI><A HREF="test2.basic">test2.basic</A></LI>
</UL>


<!--MENU-BEGIN-->
<!-- This section is automatically generated by html-update, -->
<!-- from data in 'node.el'.    Please, do not edit it here. -->
<DIV CLASS="MENU"><HR><P>|
 <A HREF="../../../../../../toc.html">Contents</a> |
 <A HREF="../../../../../../index.html">Home</a> |
 <A HREF="../sudoku-solver/index.html.in">Previous</a> |
 <A HREF="../index.html.in">Up</a> |
 <A HREF="../brainfuck/index.html.in">Next</a> |
</P><HR></DIV>
<!--MENU-END-->
<!--BOTTOM-BEGIN-->
<!-- This section is automatically generated by html-update, -->
<!-- from data in 'node.el'.    Please, do not edit it here. -->
<DIV CLASS="BOTTOM">
<hr><code><small>
 | <a href="http://www.informatimago.com//develop/lisp/com/informatimago/small-cl-pgms/basic/index.html.in">Mirror on informatimago.com</a>
 | <a href="http://informatimago.free.fr/i//develop/lisp/com/informatimago/small-cl-pgms/basic/index.html.in">Mirror on free.fr</a>
 | </small></code>

<BR><SMALL>
      <a href="http://validator.w3.org/check?uri=referer"><img
          src="http://www.w3.org/Icons/valid-html401"
          alt="Valid HTML 4.01!" height="31" width="88"></a>
   </SMALL>
</DIV>
<!--BOTTOM-END-->
</BODY>
</HTML>
ViewGit