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

Fortran 95 Program Help

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 31, 2011, 08:21
Default Fortran 95 Program Help
  #1
New Member
 
Mitchell Taulbee
Join Date: Oct 2011
Posts: 1
Rep Power: 0
mtaulbee89 is on a distinguished road
Hello everyone. I'm currently working on a battleship program in Fortran 95. I need help with how to compare the arrays that contain the ships, and the array that will be used for the users guesses. They are character arrays if that helps at all. Any help would be greatly appreciated!
mtaulbee89 is offline   Reply With Quote

Old   November 4, 2011, 08:40
Default
  #2
Member
 
Join Date: Jul 2011
Posts: 59
Rep Power: 14
rmh26 is on a distinguished road
you could use the "where" statement

where ( guess_array = hit)
ship = hit
end where

sorta like an if statement only for an entire array
rmh26 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Call Fortran program from OpenFoam tsjb00 OpenFOAM Running, Solving & CFD 6 April 22, 2013 15:26
Fortran Program with FLUENT UDFs gautamcfd FLUENT 0 August 17, 2010 05:39
How to link my fortran program to UDFs? Sam FLUENT 0 October 29, 2008 03:57
control plotting in fortran program zhe zhang Main CFD Forum 2 November 16, 1999 13:10
Any numerical triple integration program is available in Fortran? Radhakrishnan Main CFD Forum 3 March 4, 1999 01:03


All times are GMT -4. The time now is 22:40.