|
|
last edited 5 years ago by test1 |
1 2 3 4 5 | ||
Editor: page
Time: 2007/09/12 02:28:34 GMT-7 |
||
Note: |
changed: - Boot is used internally in Axiom for some of the interpreter and compiler code. Here is a detailed description of the "Boot Language":/axiom--test--1/src/boot/Makefile This is a simple example of Boot programming. Define a function. \begin{boot} pairBoot(a,b) == a>b => [-b,-a] [a,b] \end{boot} Now call it. \begin{axiom} pairBoot(1,4)$Lisp map(integer,destruct(pairBoot(3,2)$Lisp)) \end{axiom} That's my first Boot function! You can now write for example: \begin{boot} foobar(x,y) == x + y \end{boot} And call it with \begin{axiom} integer(foobar(2,3)$Lisp) \end{axiom}
Boot is used internally in Axiom for some of the interpreter and compiler code. Here is a detailed description of the Boot Language
This is a simple example of Boot programming.
Define a function.
bootpairBoot(a,b) == a>b => [-b,-a] [a,b]
>> System error: Cannot create the file /usr/lib/axiom-20050901/../../int/interp/9211484592716052519-25px001.clisp. >> System error: Cannot get the truename of "/usr/lib/axiom-20050901/../../int/interp/9211484592716052519-25px001.clisp".
Now call it.
axiompairBoot(1,4)$Lisp pairBoot is not a lisp function and so cannot be used with $Lisp. map(integer,destruct(pairBoot(3,2)$Lisp)) pairBoot is not a lisp function and so cannot be used with $Lisp.
That's my first Boot function!
You can now write for example:
bootfoobar(x,y) == x + y
>> System error: Cannot create the file /usr/lib/axiom-20050901/../../int/interp/7491012761112044243-25px003.clisp. >> System error: Cannot get the truename of "/usr/lib/axiom-20050901/../../int/interp/7491012761112044243-25px003.clisp".
And call it with
axiominteger(foobar(2,3)$Lisp) foobar is not a lisp function and so cannot be used with $Lisp.