[gambit-list] c-array

lowly coder lowlycoder at huoyanjinjing.com
Sat Feb 14 23:58:13 EST 2009


question 1:

Is it possible to write gambit code to produce the equiv of:
int foo[200]; ?

the current best I have in mind is:
(let ((foo (malloc (* 200 8)))) ... )


question 2:
suppose I have:

(c-define-type bar "bar")

is there a way to create equiv of:
bar foo[200]; ?

again, current best I have in mind is:
(let ((foo (malloc (* 200 sizeof_bar)))) ... )


question 3:

in question 1, is there a way to access foo[i] ?

question 4:

in question 2, is there a way to access foo[i] ?

thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20090214/7ecfc630/attachment.htm>


More information about the Gambit-list mailing list