CFD Online Logo CFD Online URL
Home > Forums > Main CFD Forum

Fortran 95 Program Help

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

LinkBack Thread Tools Display Modes
Old   October 31, 2011, 09:21
Default Fortran 95 Program Help
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, 09:40
Join Date: Jul 2011
Posts: 59
Rep Power: 6
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


Thread Tools
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 On
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 04:57
control plotting in fortran program zhe zhang Main CFD Forum 2 November 16, 1999 14:10
Any numerical triple integration program is available in Fortran? Radhakrishnan Main CFD Forum 3 March 4, 1999 02:03

All times are GMT -4. The time now is 09:59.