Functions returning pointers

Tobias Schlüter tobias.schlueter@physik.uni-muenchen.de
Sun Aug 22 20:30:00 GMT 2004


Paul Brook wrote:
>>Am I right in assuming that this program should print "2 2"?
>>   integer, pointer :: p
>>   integer, target :: t
>>   t = 1
>>   p = f()
> 
> 
> Presumably should be "p => f()"
> Works file with that change :)

:-O (getting red, tries to save himself by diverting attention) Well it looks
like I found a quality of implementation issue -- shouldn't that code segfault?

Thanks,
- Tobi



More information about the Fortran mailing list