Symbols

Definition

A symbol is just a string of characters. Nothing too complicated here as it is a basic building block, but there are some small restrictions on what you can include in a symbol and what the first character can be. For the purpose of this verification, I am sticking to alphanumerics and avoiding crazy stuff like making a symbol called "-1212919"...LISP will probably pick that up as a negative integer. But I disgress...let's see what Jatha kicks out...

Common LISP Code

(setq a 5)

Common LISP Output

5

Java Code

package jathaverify;
import org.jatha.*;
import org.jatha.dynatype.*;

public class Main  {

    public Main() {
    }

    public static void main(String[] args) {
        Jatha myLisp  = new Jatha(false, false);
        myLisp.init();
        myLisp.start();

        try {
            String input  = "(setq a 5)";
           LispValue result = myLisp.eval(input);
            System.out.println(input + " = " + result);
        } catch (Exception e) {
            System.err.println("LISP Exception: " + e);
        }

    }
}

Java Output (Jatha)

compile:
run:
(setq a 5) = 5
BUILD SUCCESSFUL (total time: 0 seconds)

Result

Whoohoo!