patternMajor
What does "dummy argument" mean?
Viewed 0 times
dummyargumentwhatmeandoes
Problem
What is does it mean when an argument to a function is called a dummy argument? I have not encountered this term outside Fortran, is it a general term in computer science? What would be examples of arguments passed as dummy and not passed as dummy?
I found this definition, which I am not sure that I understand, but it sounds like a dummy argument is a variable that is passed by reference, in which case in Fortran all variables are dummy variables? (confused)
Edit: I just run into the following essay which helped me to understand better Fortran's argument/function calling teminology: Dortor Fortran: I've come here for an argument
I found this definition, which I am not sure that I understand, but it sounds like a dummy argument is a variable that is passed by reference, in which case in Fortran all variables are dummy variables? (confused)
Edit: I just run into the following essay which helped me to understand better Fortran's argument/function calling teminology: Dortor Fortran: I've come here for an argument
Solution
In fortran a dummy argument is what other languages
refer to as a formal argument. So the dummy arguments
are the list of arguments in the function (or subroutine) definition.
The actual arguments are the list of arguments in the calling
list, at the point in the source code where a function is called (ie used).
refer to as a formal argument. So the dummy arguments
are the list of arguments in the function (or subroutine) definition.
The actual arguments are the list of arguments in the calling
list, at the point in the source code where a function is called (ie used).
Context
StackExchange Computer Science Q#3469, answer score: 22
Revisions (0)
No revisions yet.