Autolisp 

   
   

Output:

Unhandled SB-C::INPUT-ERROR-IN-LOAD in thread #<SB-THREAD:THREAD "main thread" RUNNING
                                                 {10005184C3}>:
  READ error during LOAD:

    Package C does not exist.

      Line: 1, Column: 14, File-Position: 14

      Stream: #<SB-SYS:FD-STREAM for "file /box/script.lisp" {1001532ED3}>

Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {10005184C3}>
0: (SB-DEBUG::DEBUGGER-DISABLED-HOOK #<SB-C::INPUT-ERROR-IN-LOAD {1001541F53}> #<unused argument> :QUIT T)
1: (SB-DEBUG::RUN-HOOK *INVOKE-DEBUGGER-HOOK* #<SB-C::INPUT-ERROR-IN-LOAD {1001541F53}>)
2: (INVOKE-DEBUGGER #<SB-C::INPUT-ERROR-IN-LOAD {1001541F53}>)
3: (ERROR #<SB-C::INPUT-ERROR-IN-LOAD {1001541F53}>)
4: (SB-C:COMPILER-ERROR SB-C::INPUT-ERROR-IN-LOAD :CONDITION #<SB-INT:SIMPLE-READER-PACKAGE-ERROR "Package ~A does not exist." {1001541EA3}> :STREAM #<SB-SYS:FD-STREAM for "file /box/script.lisp" {1001532ED3}>)
5: (SB-C::%DO-FORMS-FROM-INFO #<CLOSURE (LAMBDA (SB-KERNEL:FORM &KEY :CURRENT-INDEX &ALLOW-OTHER-KEYS) :IN SB-INT:LOAD-AS-SOURCE) {10015416CB}> #<SB-C::SOURCE-INFO {1001541693}> SB-C::INPUT-ERROR-IN-LOAD)
6: (SB-INT:LOAD-AS-SOURCE #<SB-SYS:FD-STREAM for "file /box/script.lisp" {1001532ED3}> :VERBOSE NIL :PRINT NIL :CONTEXT "loading")
7: ((FLET SB-FASL::THUNK :IN LOAD))
8: (SB-FASL::CALL-WITH-LOAD-BINDINGS #<CLOSURE (FLET SB-FASL::THUNK :IN LOAD) {7FF77E37769B}> #<SB-SYS:FD-STREAM for "file /box/script.lisp" {1001532ED3}>)
9: ((FLET SB-FASL::LOAD-STREAM :IN LOAD) #<SB-SYS:FD-STREAM for "file /box/script.lisp" {1001532ED3}> NIL)
10: (LOAD #<SB-SYS:FD-STREAM for "file /box/script.lisp" {1001532ED3}> :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST T :EXTERNAL-FORMAT :DEFAULT)
11: ((FLET SB-IMPL::LOAD-SCRIPT :IN SB-IMPL::PROCESS-SCRIPT) #<SB-SYS:FD-STREAM for "file /box/script.lisp" {1001532ED3}>)
12: ((FLET SB-UNIX::BODY :IN SB-IMPL::PROCESS-SCRIPT))
13: ((FLET "WITHOUT-INTERRUPTS-BODY-2" :IN SB-IMPL::PROCESS-SCRIPT))
14: (SB-IMPL::PROCESS-SCRIPT "script.lisp")
15: (SB-IMPL::TOPLEVEL-INIT)
16: ((FLET SB-UNIX::BODY :IN SAVE-LISP-AND-DIE))
17: ((FLET "WITHOUT-INTERRUPTS-BODY-7" :IN SAVE-LISP-AND-DIE))
18: ((LABELS SB-IMPL::RESTART-LISP :IN SAVE-LISP-AND-DIE))

unhandled condition in --disable-debugger mode, quitting
by

Common Lisp online compiler

Write, Run & Share Common Lisp code online using OneCompiler's Common Lisp online compiler for free. It's one of the robust, feature-rich online compilers for Common Lisp language, running the latest Common Lisp version 5.3. Getting started with the OneCompiler's Common Lisp editor is easy and fast. The editor shows sample boilerplate code when you choose language as Common Lisp and start coding.

Read inputs from stdin

OneCompiler's Common Lisp online editor supports stdin and users can give inputs to programs using the STDIN textbox under the I/O tab. Following is a sample Common Lisp program which takes name as input and prints hello message with your name.


About Common Lisp

Common Lisp is a generic language suitable for a wide range of industry applications. It is often referred as Programmable programming language because of it's high extensibility, machine independence, extensive control structures, dynamic updation of programs etc.

Common LISP was invented by John McCarthy in 1958 and was first implemenyted by Steve Russell on an IBM 704 computer.

Syntax help

Variables

  • Global variables are declared using defvar keyword and these variables will be in effect until a new value is assigned.
  • Type declaration is not required in LISP

Example


  • Local variables are declared with in a function or a procedure. The scope of local variables will be only in that function.
  • let and progare used to declare local variables.

Syntax


  • You can also create global and local variables using setq

Example


Loops

1. Loop:

This is the simplest looping mechanism in LISP. This allows the execute the set of statements repeatedly until a return statement is encountered.

Syntax


2. For:

For loop is used to iterate a set of statements based on a condition.


3. Do:

Do is also used to iterate a set of statements and then check the condition


4. Dotimes:

Dotimes is used to iterate for fixed number of iterations.

Syntax:



© Copyright 2025 One Compiler Pvt. Ltd. | Privacy Policy | Terms & Conditions