Re: Namelist usage
From: Rich Townsend (rhdt_at_barVOIDtol.udel.edu)
Date: Wed, 01 Dec 2004 20:00:08 -0500
Colin Watters wrote:
> Rich Townsend <rhdt@barVOIDtol.udel.edu> wrote in message news:<email@example.com>...
>>I've never got around to using namelists in my code, and I was wondering
>>whether anybody who *does* use them -- and find them helpful -- could
>>embark on a bit of advocacy in their favour. For instance, what sorts of
>>tasks do namelists help you tackle? What sort of coding idioms do you
>>employ with namelists?
> I find them Really Useful for printing the entire contents of a
> structure as an aid to debugging.
> My main application consists of a number of Windows DLLs. Some are
> called from C++ GUI programs written by my colleagues. The arguments
> are typically 2 or 3 structures (or should I say User-defined Types,
> this is Fortran after all) each having upwards of 50 member variables.
> With 2 lines of code I can get a complete dump of each structure,
> names and values, to a screen console or disk file.... invaluable for
> diagnosing known problems and spotting hidden ones. And I can do this
> on any machine, no Fortran compiler or developer studio needed.
How do you do this? Could you post some example code?
-- Dr Richard H D Townsend Bartol Research Institute University of Delaware [ Delete VOID for valid email address ]