-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
Clause 15Standard Clause 15: ProceduresStandard Clause 15: ProceduresFortran 202yProposals targeting the standard after F2023Proposals targeting the standard after F2023unsubmittedHas not been submitted to the committee yetHas not been submitted to the committee yet
Description
A very common request is to allow templates for subroutines or functions, in order to allow code like the following:
<T> function f(x)
<T>, intent(in) :: x
f = x + 1
end function
instead of
interface f
module procedure f_int
module procedure f_single
module procedure f_double
end interface
contains
integer function f_int(x) result(f)
integer, intent(in) :: x
f = x + 1
end function
real function f_single(x) result(f)
real, intent(in) :: x
f = x + 1
end function
real(dp) function f_double(x) result(f)
real(dp), intent(in) :: x
f = x + 1
end function
More use cases available at https://github.com/certik/fortran-generics.
aradi, milancurcic, jacobwilliams, zjibben, funnell and 1 more
Metadata
Metadata
Assignees
Labels
Clause 15Standard Clause 15: ProceduresStandard Clause 15: ProceduresFortran 202yProposals targeting the standard after F2023Proposals targeting the standard after F2023unsubmittedHas not been submitted to the committee yetHas not been submitted to the committee yet