J3/06-314 To: J3 From: Dan Nagle Subject: "get kinds" feature Date: 2006 Oct 24 Dependencies: None At 177, a straw vote requested a "get kinds" feature allowing the easy retrieval of all type kind values in support of the macros feature. This paper proposes a straw vote to do so. Here is the straw vote: For logical kind values, 1. Add a selected_log_kind() intrinsic 2. Add a logical_kinds array to iso_fortran_env 3. Require a logical for each and every integer kind 4. Undecided Discussion Option 1 parallels the real, int and char alternatives, however, it's not clear how parallel the arguments would be since there's no range or precision property, or character set name as in the other cases. Option 2 allows the number of kinds to be available as the size of the (presumably) rank-1 array. Otherwise, it's a novel approach. To support macros, perhaps we want an array for each type. Option 3 parallels the real and complex relationship. However, not all vendors currently support a logical for each integer and vice versa. A vote in favor of option 1 requires the most work, option 2 has appeared in earlier paper (04-346r2) so there's a first draft whence to proceed. The language for option three can be made quickly by cribbing from the existing language for complex. At any rate, I would like some direction before proceeding. Hopefully, we can vote this early during 178 to give plenty of time for several drafts.