Re: Read/Write Matlab files in fortran
- From: "Arjen Markus" <arjen.markus@xxxxxxxxxx>
- Date: 31 Oct 2005 02:40:42 -0800
Rather than:
- Set the type of variable
- Read the data into the variable
I would use an interface to some generic routine to hide these details.
That is:
interface fmat_varread
module procedure fmat_varread_short_int
module procedure fmat_varread_int
...
end interface
and the module defines fmat_varread_int etc. like:
integer function fmat_varread_int( ... )
err = FMAT_VARREADINFO(mat,'i32',matvar)
IF ( err .EQ. 0 ) THEN
err = FMAT_VARREADDATA(mat,matvar,i32)
END IF
fmat_varread_int = err
end function
In other words: let the compiler worry about as many details
as you can possibly get away with, making it easier for the
human user of your library.
Regards,
Arjen
.
- References:
- Read/Write Matlab files in fortran
- From: Chris Hulbert
- Read/Write Matlab files in fortran
- Prev by Date: Re: complex arithmetics
- Next by Date: Re: complex arithmetics
- Previous by thread: Read/Write Matlab files in fortran
- Next by thread: Re: Read/Write Matlab files in fortran
- Index(es):
Relevant Pages
|