guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C extensions


From: Nala Ginrut
Subject: Re: C extensions
Date: Sun, 21 Feb 2021 12:10:23 +0800

Hi Tim!
I think you may try these functions:
scm_is_true
scm_is_real_p
scm_geq_p

Best regards.


On Sun, Feb 21, 2021 at 11:57 AM Tim Meehan <btmeehan@gmail.com> wrote:

> I'm trying my hand a writing C extensions.
> I've done this for stuff like Matlab before, and was wondering how you do
> the usual checking of the arguments that are passed in from Guile.
>
> In the manual, 6.13.13.1 "C Support" has a few functions.
> libguile/numbers.h has a bunch more ...
>
> What I have is an extension function, sort of like the bessel function in
> the tutorial:
>
> https://www.gnu.org/software/guile/manual/html_node/A-Sample-Guile-Extension.html
>
> What I would like to do is verify that the first argument is an inexact
> number, larger than 0. How would I go about that? Perhaps some of it could
> be:
> SCM_REALP
> scm_misc_error
>
> Any tips?
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]