557313 (3) [Avatar] Offline
In chapter 3 when modules are discussed and compared to functions and subroutines, perhaps it would be good to mention that modules are also useful to declare derived data types. Even if derived data types will be covered in a later chapter in more detail, a mention in ch. 3 could get that idea in the reader's mind early on. I like the ease of including modules in each routine that needs to get the derived data type definition.

In another discussion topic you asked about dividing ch. 3 into two chapters to cover modules separately from subroutines and functions. A separate chapter could be good, or having more sections in ch. 3 works well too. I feel that describing all three in ch. 3 with a quick comparison is a good introduction, which could be followed later by a chapter to discuss modules in more detail. If modules were moved to a separate chapter, that would allow the discussion of other features of modules to be gathered into one chapter.

Regards, Greg
Milan Curcic (19) [Avatar] Offline
Hi Greg,

Thank you for the suggestion -- I think it's a good idea to mention derived types here.

I am now strongly considering giving modules a dedicated chapter, which would give me space to protected variables (currently not even mentioned) and submodules.

557313 (3) [Avatar] Offline
Hi Milan,

A chapter on modules and details about the useful features they provide (protected variables, derived data types, etc.) sounds great to me. Would you recast the wave example to use modules for comparison to using functions and subroutines?

Regards, Greg