J3 / 97 - 249 r1 (page 1 of 2)
Date: November 12, 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 document J3/97-007R1 (Sep 1997). Page and line references below are to document J3/97-007R1 (Sep 1997).
Editor: Please use a blank character where # appears in the examples below.
[224: 12-14] Replace second sentence by the two following sentences: The elemental functions AIMAG, CONJG, AINT, ANINT, NINT, ABS, MOD, SIGN, DIM, DPROD, MODULO, FLOOR, and CEILING perform simple numeric operations. The elemental functions MAX and MIN perform simple numeric or character operations.
Max:
[258: 30] Add sentence: For arguments of character type, the result is the value 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. 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#" /).
MaxLoc:
[259: 37+] If ARRAY has type character, the result is the value 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.
J3 / 97 - 249 r1 (page 2 of 2)
MaxVal:
[260: 30+] If ARRAY has type character, the result is the value 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.
Min:
[261: 18] Add sentence: For arguments of character type, the result is the value 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. 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#" /).
MinLoc:
[262: 27+] If ARRAY has type character, the result is the value 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.
MinVal:
[263: 23+] If ARRAY has type character, the result is the value 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.
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.