Has Fortran ever gotten around to handling subroutine argument lists with arbitrary length, like C can do? (BTW, "present" isn't going to work for what I am trying to do.) Thanks.
There are no such subroutines in Fortran.
The syntax rule for a subroutine statement in Fortran 2008 is (12.6.2.3, R1235):
[ prefix ] SUBROUTINE subroutine-name [ ( [ dummy-arg-list ] ) [ proc-language-binding-spec ] ]
where dummy-arg-list
is a list (in assumed syntax rule terms) of dummy-arg
s. A dummy-arg
is (R1235) either a name or a literal *
.
[Before we get too excited about the possibility of variadic support, the *
refers, of course, to an alternate return indicator.]
A list (R101) still refers to a well-defined (at source time) number of items.
There is a stated restriction regarding interoperability with C, that (15.3.7) the C prototype
... does not have variable arguments as denoted by the ellipsis (...)
Similar arguments apply to (Fortran) functions.
© 2022 - 2024 — McMap. All rights reserved.