source: trunk/j/examples/abcl/lispcall_from_java_with_params_and_return/lispfunctions.lisp @ 11382

Last change on this file since 11382 was 11382, checked in by vvoutilainen, 13 years ago

Examples for using abcl, initial commit.

File size: 532 bytes
Line 
1; param comes from java, so accessing it require
2; calling jobject-lisp-value on it
3(defun void-function (param)
4  (format t "in void-function, param: ~a~%" (jobject-lisp-value param)))
5
6; params come from java, so accessing them require
7; calling jobject-lisp-value on them
8(defun int-function (jparam1 jparam2)
9  (let* ((param1 (jobject-lisp-value jparam1))
10   (param2 (jobject-lisp-value jparam2))
11   (result (+ param1 param2)))
12    (format t "in int-function, params: ~a ~a~%result: ~a~%" 
13      param1 param2 result) 
14    result))
Note: See TracBrowser for help on using the repository browser.