procedure Control (F : access procedure) is
begin
F.all;
end Control;
void control (void (*f)()) {
(*f)();
}
T control(Func<T> f) {
return f();
}
void control(void function() f)
{
f();
}
import std.traits;
void control(alias f)()
if (isCallable!f)
{
f();
}
control(Function f) => f();
def control(f) do
f()
end
module x
implicit none
contains
subroutine control(f)
interface
subroutine f()
end subroutine f
end interface
call f
end subroutine control
end module x
module x
implicit none
contains
subroutine control(f)
interface
subroutine f()
end subroutine f
end interface
call f
end subroutine control
end module x