Re: [racket] how to create a ctype array

2012-12-13 Thread Jon Rafkind
_array produces a ctype, not an actual array itself. To get an array you can create one with malloc or you can call a C function through the ffi. If you use malloc then you get back a generic # type which you can convert to an array using ptr-ref as per the docs: "Since an array is treated like

[racket] how to create a ctype array

2012-12-13 Thread 刘海宽
in the reference, I see the _array function, but I don't understand well, when i try to do, always output errors, can anyone give me an example? here is my test in REPL:racket@> (_array _int 3)#racket@> (array? (_array _int 3))    ; why?#fracket@> Racket Users list: http://