-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
you can use bind(C) on function and subroutine definition.
also, when passing scalar values, you can annotate them with `value``
function add(a,b) bind(C) result(c)
integer(kind=4), intent(in), value :: a,b
integer(kind=4) :: c
c = a + b
end functionvalue means the argument is passed by value, rather than pointer
this would be equivalent to
int32_t add(int32_t a, int32_t b);I think this way you can skip most of the .h files, unless haskell relies on them.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels