CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Coding in Fortran95

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   November 16, 2009, 16:59
Default Coding in Fortran95
  #1
New Member
 
Mohammad
Join Date: Jul 2009
Posts: 4
Rep Power: 16
Moradi is on a distinguished road
Hi,
I am doing coding. I use Fortran95.
I have some subroutines which contains optional arguments.
When I call them I can use "if () then" or "select case()" to choose whether assign data to these optional arguments or not. As I know even if I assign an undefined data (undefined array; e.g. an allocatable array which i not allocated) to these subroutines, program will not encounter any problem.
My question is: should I actually use a criterion (using "if" or "select case") when I assign data to these subroutines (for example: when I have an allocatable array I can use "if"; so, when the array is not allocated I will not assign it to the optional argument. But, is it necessary)?

Thanks so much.
Moradi is offline   Reply With Quote

 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Varibales for user coding Tomo STAR-CCM+ 3 September 10, 2009 03:49
Help with coding James Main CFD Forum 2 May 18, 2005 05:12
Coding begineer of cfd Main CFD Forum 1 July 21, 2004 05:11
Ground coding enquiry Wenqing Zhang Phoenics 2 August 12, 2002 11:56
User coding on NT w2k Philip Jones Siemens 0 November 26, 2001 03:43


All times are GMT -4. The time now is 16:12.