mirror of
https://gitlab.com/eql/EQL5.git
synced 2026-01-04 00:02:43 -08:00
review "qml-lisp"
This commit is contained in:
parent
03c7a5ded5
commit
140e793040
6 changed files with 77 additions and 29 deletions
|
|
@ -6,11 +6,22 @@ Item {
|
|||
|
||||
Component.onCompleted: {
|
||||
|
||||
console.log(Lisp.apply("format", [null, "~R", 123])) // (1) call CL function
|
||||
// PLEASE NOTE:
|
||||
//
|
||||
// * for calling any CL or EQL function with max. 9 arguments, use Lisp.fun()
|
||||
// * for either more than 9 arguments or passing (nested) lists, use Lisp.apply()
|
||||
|
||||
console.log(Lisp.apply("x:join", [["11", "55"], ":"])) // (2) nested arrays are possible
|
||||
// (1) call CL function
|
||||
console.log(Lisp.fun("format", false, "~R", 123))
|
||||
|
||||
Lisp.apply("qmsg", ["hello from QML"]) // (3) call EQL function
|
||||
// (2) call EQL function
|
||||
Lisp.fun("qmsg", "hello from QML")
|
||||
|
||||
// (3) pass list argument (note Lisp.apply)
|
||||
console.log(Lisp.apply("x:join", [["11", "55"], ":"]))
|
||||
|
||||
// (4) nested list arguments (note Lisp.apply)
|
||||
console.log(Lisp.apply("list", [[[1, 2, 3], ["a", "b", "c"], 4, 5], 6, [[7, 8], 9]]))
|
||||
}
|
||||
|
||||
Text {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue