Re: initializing an array of user-defined data types
- From: Dan Nagle <dannagle@xxxxxxxxxxx>
- Date: Wed, 28 Nov 2007 21:03:48 GMT
Hello,
At the risk of entering a beauty contest, ;-)
Paul van Delst wrote:
Bart Vandewoestyne wrote:
What is the proper way to do this?
What about this sort of thing:
type :: piece
integer :: i = -1
real :: x = -999.99
end type piece
...
type(piece), dimension(:,:), allocatable :: board
If you need an answer to a predicate, use a logical
type ...
logical :: has_piece ! or occupied etc
....
end type ...
Real equality should be avoided where possible.
YMMV ;-)
--
Dan Nagle
Purple Sage Computing Solutions, Inc.
.
- References:
- initializing an array of user-defined data types
- From: Bart Vandewoestyne
- Re: initializing an array of user-defined data types
- From: Paul van Delst
- initializing an array of user-defined data types
- Prev by Date: Re: initializing an array of user-defined data types
- Next by Date: Re: Fortran Error Reporting Requirements (Was: GFORTRAN PROBLEM WITH SAVE STATEMENT)
- Previous by thread: Re: initializing an array of user-defined data types
- Next by thread: Re: initializing an array of user-defined data types
- Index(es):
Relevant Pages
|