Guile Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Guile numerical work and uniform arrays
>>>>> "Per" == Per Bothner <bothner@cygnus.com> writes:
Per> I don't believe anyone has proposed an "array contents" form at
Per> the *Scheme* level. I've already argued against it in an earlier
Per> message. What you will have is a C macro that will give you a
Per> reference to the first element.
Sorry, but it is already present at scheme level in guile :)
You can easily check this:
(define A #2e((1 2) (3 4)))
(array-contents A) ;=> #e(1 2 3 4)
There exists corresponding C function, of course.
Thus, after application of ARRAY-CONTENTS you get uniform-vector.
Of course, you can get a pointer to the first element of it
(by the way, I do not know a politically correct way to do this - I
use
gh_cdr(uve)
although I'm sure there must be better way).
--
Best regards,
V.Kamyshenko.
Guile Home |
Main Index |
Thread Index