1 (edited by JohnWasilewski 2013-09-10 23:33:12)

Topic: CHRPAK module usage question

I  note that the documentation for the new, excellent-looking, CHRPAK package, includes the following:

      "This distribution has been updated to place
        everything in the "chrpak" module. 
        The developer must "use chrpak" rather
        than just call the subroutines and functions
        as implied by the homepage."

I note that, in order to use CHRPAK, one must "USE" it.

Does this mean that the entire source or this library will then have to be compiled, linked, loaded. even when only calling a single subroutine from it in the main program code?
---
J.

Re: CHRPAK module usage question

Nope, it only means that in order to call, for example, ch_scrabble_points, you'll need to have your (sub)program use chrpak first, as I show below:

program scrabble_score
use chrpak
implicit none

character::c

    c = 'Q'

   Print *, "The scrabble points for "//c//" are: ", ch_scrabble_points(c)

end program scrabble_score

As long as the flag -lchrpak appears in your Linker Flags under Project Options, everything should just work.

The chrpak module is stored in the AddOns directory, which is automatically searched for modules and libraries by default.

Jeff Armstrong
Approximatrix, LLC