[petsc-dev] Fortran 2003 enum
Barry Smith
bsmith at mcs.anl.gov
Tue Dec 7 13:05:02 CST 2010
On Dec 7, 2010, at 11:39 AM, Blaise Bourdin wrote:
>
> On Dec 7, 2010, at 11:34 AM, Jed Brown wrote:
>
>>
>
> Everybody that uses a compiler that supports it. they may not take advantage of it, but the fortran 2003 functionalities should be available.
> Another goodie is interoperability of C structs and fortran derived types.
>
> Back to enum, I was hoping that direct translations between C and fortran enum would make it possible to write PetscOptionsGetENum and PetscBagRegisterEnum fortran bindings.
Actually the reason we don't have Fortran stubs for these is the difference Fortran (77?) handles strings from C (not related to handling of enums). In fact many of the Fortran manual bindings come from string issues. So the question is if Fortran 2003 allows easy passing of strings and arrays of strings between Fortran and C? The tables don't talk specifically about string passing, does anyone know?
Barry
>
> Blaise
>
>
>>
>> Jed
>
> --
> Department of Mathematics and Center for Computation & Technology
> Louisiana State University, Baton Rouge, LA 70803, USA
> Tel. +1 (225) 578 1612, Fax +1 (225) 578 4276 http://www.math.lsu.edu/~bourdin
>
>
>
>
>
>
>
More information about the petsc-dev
mailing list