Say I have a routine foo()
that calls a routine bar(argument)
. Argument
can either be a declaration "on the stack" (draw开发者_如何学Going a parallel to C) or it can be dynamically allocated. How can I inquire inside bar()
if argument
memory was allocated with the first or the second method ?
The best thing would be to see the assembly code. Arrays will be typically on the heap and local scalars on the stack, but there is no standard fortran inquire function for that and your code should not depend on these details.
精彩评论