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

Last change on this file since 11383 was 11383, checked in by vvoutilainen, 14 years ago

Add copyright/license headers.

File size: 1.3 KB
Line 
1;;; lispfunctions.lisp
2;;;
3;;; Copyright (C) 2008 Ville Voutilainen
4;;;
5;;; This program is free software; you can redistribute it and/or
6;;; modify it under the terms of the GNU General Public License
7;;; as published by the Free Software Foundation; either version 2
8;;; of the License, or (at your option) any later version.
9;;;
10;;; This program is distributed in the hope that it will be useful,
11;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13;;; GNU General Public License for more details.
14;;;
15;;; You should have received a copy of the GNU General Public License
16;;; along with this program; if not, write to the Free Software
17;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18
19; param comes from java, so accessing it require
20; calling jobject-lisp-value on it
21(defun void-function (param)
22  (format t "in void-function, param: ~a~%" (jobject-lisp-value param)))
23
24; params come from java, so accessing them require
25; calling jobject-lisp-value on them
26(defun int-function (jparam1 jparam2)
27  (let* ((param1 (jobject-lisp-value jparam1))
28   (param2 (jobject-lisp-value jparam2))
29   (result (+ param1 param2)))
30    (format t "in int-function, params: ~a ~a~%result: ~a~%" 
31      param1 param2 result) 
32    result))
Note: See TracBrowser for help on using the repository browser.