J3/97-249 Date: October 29, 1997 To: J3 From: Loren P. Meissner Subject: Edits for M.5: Extend Max and Min Intrinsics to Character Type References: X3J3/96-007r1, X3J3/96-131r1, J3/97-156r1, J3/97-207 PROPOSAL: Extend the intrinsic functions Max, Min, MaxLoc, MinLoc, MaxVal, and MinVal to accept arguments of character data type. PROPOSED ADDITIONAL EDITS: Note: Edits that were approved at Meeting 141 (May 1997) are shown in docment J3/97-007R1 (Sep 1997). Page and line references below are to docment J3/97-007R1 (Sep 1997). Editor: Please use a blank character where # appears in the examples below. [224: 14+] Add paragraph: The arguments to MAX or MIN may be character expressions. The largest or smallest character value is the one that would be selected by application of intrinsic relational operators: i.e., the collating sequence for characters with the kind type parameter of the arguments is applied. [227: 24+] Add paragraph: The argument of MAXVAL or MINVAL may be a character array. The largest or smallest character value is the one that would be selected by application of intrinsic relational operators: i.e., the collating sequence for characters with the kind type parameter of the arguments is applied. [228: 11+] Add paragraph: The argument of MAXLOC or MINLOC may be a character array. The largest or smallest character value is the one that would be selected by application of intrinsic relational operators: i.e., the collating sequence for characters with the kind type parameter of the arguments is applied. [258: 30] Add sentence: For character arguments, if the selected argument is shorter than the longest argument the result is padded with blanks on the right to the length of the longest argument. [258: 31] Add examples: MAX ("Z", "BB") is "Z#", and MAX ( (/ "A", "Z" /), (/ "BB", "Y#" /) ) is (/ "BB", "Z#" /). [261: 18] Add sentence: For character arguments, if the selected argument is shorter than the longest argument the result is padded with blanks on the right to the length of the longest argument. [261: 19] Add examples: MIN ("A", "YY") is "A#", and MIN ( (/ "Z", "A" /), (/ "YY", "B#" /) ) is (/ "YY", "A#" /). BACKGROUND: Specification and Syntax were approved at Meeting 138 (August 1996) - see X3J3/96-131r1. Edits were approved at Meeting 141 (May 1997). The edits in this paper are intended to supply additional informative text.