Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!ames!skipper!altair!maine From: maine@altair.dfrf.nasa.gov (Richard Maine) Newsgroups: comp.lang.fortran Subject: Re: What's the right way to get a block data from a library? Message-ID: Date: 17 Mar 91 19:16:16 GMT References: Sender: news@skipper.dfrf.nasa.gov Distribution: comp Organization: NASA Dryden, Edwards, Cal. Lines: 26 In-reply-to: jonz@locus.com's message of 16 Mar 91 07:17:33 GMT On 16 Mar 91 07:17:33 GMT, jonz@locus.com (Jon Ziegler) said: [... discussion of the problems of block data ...] Jon> Has it been addressed in any new way by the F8x (or is it Jon> F9x?) people? Fortran 90 modules essentially replace most of the useful functionality of Fortran 77 common blocks. Although F90 still supports COMMON for compatability with old codes (almost 100% of which use COMMON), you don't really need it for most new codes. As for the particular question of how block data relates to modules, global variables in a module can be initialized within the module itself. Thus none of the problems of block data arise. In my own F77 code, I avoid block data because of its portability problems. (This doesn't mean I do non-standard initialization of COMMMON variables outside of block data - it just means I avoid initialization of COMMON variables). This does occasionally cause me heartbreak when I'd really like to initialize something in COMMON, but I resist the temptation and find another way. -- -- Richard Maine maine@altair.dfrf.nasa.gov