diff options
Diffstat (limited to '')
-rw-r--r-- | misc/cgo/fortran/answer.f90 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/misc/cgo/fortran/answer.f90 b/misc/cgo/fortran/answer.f90 new file mode 100644 index 0000000..b3717ee --- /dev/null +++ b/misc/cgo/fortran/answer.f90 @@ -0,0 +1,9 @@ +! Copyright 2016 The Go Authors. All rights reserved. +! Use of this source code is governed by a BSD-style +! license that can be found in the LICENSE file. + +function the_answer() result(j) bind(C) + use iso_c_binding, only: c_int + integer(c_int) :: j ! output + j = 42 +end function the_answer |