So CLHS doesn't add the return value to its declaration....so I guess its okay not to...Does anybody ever do it I mean would it be weird if I did it and if not what would be syntax pertaining to the code in my post


On Monday, March 10, 2014 1:09 PM, Martin Simmons <martin@lispworks.com> wrote:
See http://www.lispworks.com/documentation/HyperSpec/Body/f_ash.htm

for an example of how CLHS uses the "Syntax" and "Arguments and Values"
sections to describe functions.

--
Martin Simmons
LispWorks Ltd
http://www.lispworks.com/



>>>>> On Sun, 9 Mar 2014 00:46:33 -0800 (PST), Joeish W said:
>
> Here is my defcfun as I normally write it,
>
> ;; Size Mat::size() const
> ;; Size* cv_Mat_size(Mat* self)
> (defcfun ("cv_Mat_size" mat-size) (:pointer size)
>   (self (:pointer mat)))
>
>
> the
>
>
> ;; Size Mat::size() const
>
>
> is the C++  function declaration with a Size return value
>
>
> The ;; Size* cv_Mat_size(Mat* self) is the  C wrapper function declaration with a Size* return value
>
>
> This is my defcfun with a (:pointer size) return value
>
> (defcfun ("cv_Mat_size" mat-size) (:pointer size)
>   (self (:pointer mat)))
>
> In my Documentation for this function I list the Common Lisp function declaration as
>
> (MAT-SIZE (SELF (:POINTER MAT)))
>
>
> I couldn't figure out if I should add a return value
>
>
> but in C++ the return value always goes up front i/e ;; Size Mat::size() const
>
> Is it common to put return values on Lisp/CFFI function declarations and if so where
>
>
> in this declaration  (MAT-SIZE (SELF (:POINTER MAT))) should I put mine
>
> btw on the CLHS I didn't see or missed return values on any function declaration
>
> Thanks in advance for any  takers=)
>
> Good Day.