Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function scheme_make_list_int (array) result (list)
- use scm, only: scm_t, scm_list, scm_cons, scm_from_int
- implicit none
- integer(IK), intent(in) :: array(:)
- type(scm_t) :: list
- ! *** end of interface ***
- ! FIXME: Intel compiler has troubles assembling the final list in
- ! the result directly. Introduce temp var:
- type(scm_t) :: temp
- integer :: i
- temp = scm_list ()
- do i = size (array), 1, -1
- temp = scm_cons (scm_from_int (array (i)), temp)
- enddo
- list = temp
- end function scheme_make_list_int
- type, public, bind(c) :: scm_t
- private
- integer(c_intptr_t) :: ptr
- end type scm_t
Advertisement
Add Comment
Please, Sign In to add comment