- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using CVF6.6B
My question is about the sequence of compiling Type declarations
The following example module has two types, where the second type is depending on the first one.
module global1
TYPE ITEM
REAL COST
CHARACTER(LEN=30) SUPPLIER
CHARACTER(LEN=20) ITEM_NAME
END TYPE ITEM
TYPE PRODUCE
REAL MARKUP
TYPE(ITEM) FRUIT
END TYPE PRODUCE
end module global1
This compiles fine
Now when I change the sequence of the types in the following way
module global2
TYPE PRODUCE
REAL MARKUP
TYPE(ITEM) FRUIT
END TYPE PRODUCE
TYPE ITEM
REAL COST
CHARACTER(LEN=30) SUPPLIER
CHARACTER(LEN=20) ITEM_NAME
END TYPE ITEM
end module global2
then I get the following error message
Error: This derived type name has not been declared. [ITEM]
TYPE(ITEM) FRUIT
-----------^
This is because the Type ITEM is compiled after it is needed for the Type Produce
Is the a possibility (compiler option) to compile the second module without changing the sequence ???
The problem is, I have a source code with lots of Type declarations and they are all in the wrong order.
Thanks for any help
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No such option - you'll have to correct the code.
Steve
Steve

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