- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello All
In intel compiler 2015, if I want to use the enum. I have to use it as follows
enum,bind(c)
enumerator :: BLUE
end enum
So, the BLUE was set integer 4 as in the C lang.
Can I change it to integer 8?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is no language in the Fortran standard to allow you to do that, nor do we automatically widen them with the /integer-size:64 switch.
As you probably saw, part of the definition of the Fortran ENUM is this:
For an enumeration, the kind is selected such that an integer type with that kind is interoperable (15.3.2) with the
corresponding C enumeration type.
If you need integer parameters that are bigger (or smaller) than 4-byte integers, then you will need to explicitly define each one.
--Lorri

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page