File: types_13.f90

package info (click to toggle)
lfortran 0.58.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 54,512 kB
  • sloc: cpp: 162,179; f90: 68,251; python: 17,476; ansic: 6,278; yacc: 2,334; sh: 1,317; fortran: 892; makefile: 33; javascript: 15
file content (74 lines) | stat: -rw-r--r-- 1,666 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
program types_13
use iso_c_binding, only: c_int, c_double, c_char
implicit none

interface
    subroutine g(d)
    character*(*) :: d
    end subroutine

    subroutine g2(d)
    character(len=*) :: d
    end subroutine

    subroutine g3(d)
    import :: c_char
    character(len=*, kind=c_char) :: d
    end subroutine

    subroutine g4(d)
    import :: c_char
    character(*, kind=c_char) :: d
    end subroutine

    subroutine g5(d)
    import :: c_char
    character(kind=c_char, len=*) :: d
    end subroutine

    subroutine g6(d)
    character*5 :: d
    end subroutine


    integer(c_int) function f1(a, b, c, d) result(r) bind(c)
    import :: c_int, c_double
    integer*4, value, intent(in) :: a
    real*8, value, intent(in) :: b
    logical*4 :: c
    end function

    integer(c_int) function f2(a, b, c, d) bind(c) result(r)
    import :: c_int, c_double
    integer*4, value, intent(in) :: a
    real*8, value, intent(in) :: b
    logical*4 :: c
    end function

    function f3(a, b, c, d) result(r) bind(c)
    import :: c_int, c_double
    integer(c_int) :: r
    integer*4, value, intent(in) :: a
    real*8, value, intent(in) :: b
    logical*4 :: c
    end function

    function f4(a, b, c, d) bind(c) result(r)
    import c_int, c_double
    integer(c_int) :: r
    integer*4, value, intent(in) :: a
    real*8, value, intent(in) :: b
    logical*4 :: c
    end function

    subroutine f5(a, b, c) bind(C, name="_cf5")
    import :: c_int
    import :: c_double
    integer(c_int) :: r
    integer(c_int), value, intent(in) :: a
    real(c_double), value, intent(in) :: b
    logical :: c
    end subroutine
end interface

end program