Alvaro Fernandez writes:
> I'm afraid I don't follow how the "gluing together" works, though. I
> understand one can have two versions of the algorithm in the body, and
> branch based on the (integer) kind value, but how do you work it so your
> generic has only one set of dummy arguments?
The same way that intrinsic generics have worked since f77. I.e. the
same way that sin(x) works for both single and double precision (or
quad if you have such) x. It isn't a run-time branch. You provide
all the specific versions. Then the compiler selects *AT COMPILE
TIME* the specific version that matches the argument kinds; if there
isn't a matching specific, you'll get an error message.
--
Richard Maine | Good judgment comes from experience;
[log in to unmask] | experience comes from bad judgment.
| -- Mark Twain
|