|
multidimensional C-ARRAY: documentation differs from implementati on: msg#00135lisp.clisp.general
Hi, there's a mismatch between implemented code and impnotes. Impnotes uses (c-array c-type dim1 dim2 ... dimn) The code implements (c-array c-type (dim1 dim2 ... dimn)) and (c-array c-type dim) as a shortcut for a one-dimensional array. Back in 1996, before impnotes was converted to HTML, doc/foreign.txt already contained this mismatch: the BNF describing c-array, c-struct etc. defined (c-array c-type (dim1 ... dimn)) and (c-array c-type dim1) -- as implemented -- while the explaining text talked about (c-array c-type dim1 ... dimn). The BNF was dropped during conversion to HTML. (c-array c-type (dim1 ... dimn)) looks familiar to Lisp declarations (array elt-type (dim1 ... dimn)) However, (c-array c-type Number) means something completely different from (array elt-type Number): the latter specifies an N-dimensional array. The number-or-list polymorphism thus resembles MAKE-ARRAY, not Lisp array declarations. If nobody says otherwise during a two weeks delay, I suggest to change the documentation to reflect the code, even though I'd prefer the (c-array c-type dim1 ... dimn) syntax that the description of c-array and ffi:element refer to and which naturally expands the (c-array c-type dim1) case. YMMV http://clisp.cons.org/impnotes/dffi.html Regards, Jörg Höhle. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | trouble with clisp-2.30-i686-unknown-linux-2.4.18-10.tar.gz: 00135, Don Cohen |
|---|---|
| Next by Date: | error or warning during compilation, yet some function is generat ed: 00135, Hoehle, Joerg-Cyril |
| Previous by Thread: | trouble with clisp-2.30-i686-unknown-linux-2.4.18-10.tar.gzi: 00135, Don Cohen |
| Next by Thread: | error or warning during compilation, yet some function is generat ed: 00135, Hoehle, Joerg-Cyril |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |