CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Main CFD Forum (
-   -   Fortran 95 Program Help (

mtaulbee89 October 31, 2011 09:21

Fortran 95 Program Help
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!

rmh26 November 4, 2011 09:40

you could use the "where" statement

where ( guess_array = hit)
ship = hit
end where

sorta like an if statement only for an entire array

All times are GMT -4. The time now is 23:13.