J3/04-224 Date: 2004-01-29 To: J3 From: fortran.com Subject: Single character substring selection Reference: Pub-114 This was submitted by James Giles jamesgiles@att.net =========================================================== Number: Title: Single character substring selection Submitted by: J3 Status: For Consideration References: FCD, Section 6 Basic Functionality: Eliminate the need for the colon when you want a substring consisting of a single character. Rationale: When an expression describing which character you want to extract is complex, the necessity to repeat it on both sides of the colon is verbose, error prone, and redundant. Two examples from note 6.3 using the recommended new form: P%name(1) ! first character on name '0123456789'(N+1) ! the digit corresponding to N Estimated Impact: Little impact. No existing conforming code need be changed. Implementations will have to support a slightly different subscripting. But, since it will be more consistent with how arrays are subscripted, it won't be mush of a change (may even make implementation easier). Detailed Specification: Change R611 to read: R611 substring-range is [scalar-int-expr] [: [scalar-int-expr]] After line 104:17 add: If only the first scalar-int-expr is present and no colon is used, the length of the substring is one. History: Submitted as Pub-114