Fwd: Re: slightly OT: nullifying an array of pointers

Paul Thomas paulthomas2@wanadoo.fr
Thu Jul 6 18:52:00 GMT 2006


Daniel,

>Paul,
>thanks for the quote =)
>
>  
>
>>However, you can achieve what you want with an derived type constructor:
>>[...]
>> array = intptr (null())
>>    
>>
>
>Although this is standard conforming fortran, the quote from Scott
>Meyers holds nevertheless:
>  
>
What on earth are you talking about?

>"The built-in types both set expectations in the reader and offer a
>spec for the writer: 'When in doubt, do as the ints do'." [1,2]
>
>Sometimes it's not that easy ...
>
>    
>  
>
These quotes about C++ have nothing whatsoever to do with the use of 
structure constructors in gfortran; the structure constructor in fortran 
is effectively a specific inline function that loads the fields of a 
particular type of structure.  There is absolutely no C++-ness in it 
whatsoever.

Don't look for problems where there are none.  Fortran-95 remains a 
wysiwyg of programming langauges.

Paul



More information about the Fortran mailing list