3 ms·
How does Fortran enforce this, actually? Does it just not let you pass the same array to a function via multiple parameters?
by TazeTSchnitzel 6y ago
How does Fortran enforce this, actually? Does it just not let you pass the same array to a function via multiple parameters?
- bodhiandpysics1 6y agoFortran didn't originally have pointers, and pointer based code is relatively rare in fortran, so making requirements about pointer aliasing doesn't have same potential to completely break your code that it does in c. The reason c can't actually restrict the restrict keywoard, is that the standard would break code!
- gnufx 6y agoThe storage association rules have nothing to do with pointers like that. Code will typically break because arguments are passed with copy-in/copy-out semantics, not by reference.
- gnufx 6y agoIt does, indeed, but that's not the only way to associate storage. Using INTENT to specify whether an array is updated is useful.