Before you can use a derived datatype, you must create it. Here are the steps you take:
- Construct the datatype.
- Allocate the datatype.
- Use the datatype.
- Deallocate the datatype.
You must construct and allocate a datatype before using it. On the other hand, once you have it constructed and allocated, you are not required to use or deallocate it.
Let's go through these steps in more detail: