For Programmers: Free Programming Magazines  


Home > Archive > Fortran > May 2005 > Re: block data and namelist









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: block data and namelist
Steve Lionel

2005-05-14, 4:05 pm

On Fri, 13 May 2005 19:00:41 +0200 (CEST), Thomas Koenig
<Thomas.Koenig@online.de> wrote:

>Is it OK to have a namelist in block data, like this?
>
> block data
> common /foo/ a
> namelist /foo_n/ a
> data a /1.0/
> end


No, but this is rather pointless, anyway, as the namelist would not be visible
to anything in the program.

You could put the namelist in an include file. The COMMON declaration (and
the declarations of any common variables) should also be in an include file,
so that it is the same everywhere it is used. the BLOCK DATA should include
the common def and then add the DATA.


Steve Lionel
Software Products Division
Intel Corporation
Nashua, NH

User communities for Intel Software Development Products
http://softwareforums.intel.com/
Intel Fortran Support
http://developer.intel.com/software/products/support/
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com