"Dummy" as "unused"
In general (not in Fortran) a dummy argument is an argument that will not be used by the body of the function.
For example, in the following function, z
is a dummy argument but x
and y
are not.
int f(int x, int y, int z) {
return (x + y);
}
They can be used for several reasons:
depending on another argument or some configuration, the argument will be used (not dummy) and sometimes it won't (dummy) but the programming setting imposes to pass an argument anyway. In that case, you can usually pass anything to the function, i.e. NULL
or 0
, depending on the setting;
the argument is no more needed, but you have to give one for backward compatibility reasons;
the function does not take any argument (it can be called a procedure) but the setting imposes to give at least an argument. You can find this in unpure functional programming languages but in general it is not called "dummy" because the type (unit
in ocaml) suggests it.
"Dummy" in Fortran and Pascal
In Fortran and Pascal, and probably in your case, there is a more obscure notion of passed-object dummy argument that I have failed to comprehend. But it seems to concerns more the specification than the actual argument-passing procedure. (Some explanations: link 1 with both languages, link 2 in French).
I don't know if this notion is still used.
"Dummy" as "bound"
I would not advise this terminology in any case, but "dummy variable" can mean "bound variable" but this notion is more of a math and computer science thing.