View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000417 | 1003.1(2008)/Issue 7 | Shell and Utilities | public | 2011-04-22 23:11 | 2013-04-16 13:06 |
Reporter | jilles | Assigned To | ajosey | ||
Priority | normal | Severity | Editorial | Type | Clarification Requested |
Status | Closed | Resolution | Accepted As Marked | ||
Name | Jilles Tjoelker | ||||
Organization | |||||
User Reference | |||||
Section | 2.6.2 Parameter Expansion | ||||
Page Number | 2306-2307 | ||||
Line Number | 72725-72729, 72747-72749 | ||||
Interp Status | Approved | ||||
Final Accepted Text | See 0000417:0000800 | ||||
Summary | 0000417: ${#?} is ambiguous | ||||
Description | The expansion ${#?} can be interpreted both as the length of $? and as $# giving an error in the (impossible) case that it is not set. That is ${#parameter} with parameter "?" or ${parameter?[word]} with parameter "#" and no word. Because the former interpretation is most common and the only one which may have some use, I would suggest requiring that one. If word is to be made optional in other forms of parameter expansion as well, similar problems will arise with ${#-} and ${##}. | ||||
Desired Action | After the paragraph about ${parameter:?[word]}, add something like: If parameter is '#', word must be specified. This is necessary to avoid ambiguity with the string length expansion. Alternatively, it could be left unspecified by also adding restrictions which special parameters ${#parameter} may be applied to. | ||||
Tags | tc1-2008 |
|
Interpretation response ------------------------ The standard is unclear on this issue, and no conformance distinction can be made between alternative implementations based on this. This is being referred to the sponsor. Rationale: ------------- The expansion ${#?} can be interpreted both as the length of $? and as $# giving an error in the (impossible) case that it is not set. Notes to the Editor (not part of this interpretation): ------------------------------------------------------- At line 72734 insert a sentence before "The following table summarizes ...": If parameter is '#' and the colon is omitted, the application shall ensure that word is specified (this is necessary to avoid ambiguity with the string length expansion). |
|
Interpretation proposed 16 June 2011 for final 30 day review |
|
The interpretation is now approved. |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-04-22 23:11 | jilles | New Issue | |
2011-04-22 23:11 | jilles | Status | New => Under Review |
2011-04-22 23:11 | jilles | Assigned To | => ajosey |
2011-04-22 23:11 | jilles | Name | => Jilles Tjoelker |
2011-04-22 23:11 | jilles | Section | => 2.6.2 Parameter Expansion |
2011-04-22 23:11 | jilles | Page Number | => 2306-2307 |
2011-04-22 23:11 | jilles | Line Number | => 72725-72729, 72747-72749 |
2011-06-02 16:01 | nick | Note Added: 0000800 | |
2011-06-02 16:03 | nick | Note Edited: 0000800 | |
2011-06-02 16:05 | nick | Interp Status | => --- |
2011-06-02 16:05 | nick | Final Accepted Text | => See 0000417:0000800 |
2011-06-02 16:05 | nick | Status | Under Review => Interpretation Required |
2011-06-02 16:05 | nick | Resolution | Open => Accepted As Marked |
2011-06-02 16:06 | nick | Note Edited: 0000800 | |
2011-06-02 16:06 | nick | Note Edited: 0000800 | |
2011-06-02 16:07 | nick | Tag Attached: tc1-2008 | |
2011-06-02 16:07 | nick | Interp Status | --- => Pending |
2011-06-03 18:24 | eblake | Relationship added | related to 0000457 |
2011-06-16 10:17 | ajosey | Interp Status | Pending => Proposed |
2011-06-16 10:17 | ajosey | Note Added: 0000849 | |
2011-07-29 06:13 | ajosey | Interp Status | Proposed => Approved |
2011-07-29 06:13 | ajosey | Note Added: 0000903 | |
2013-04-16 13:06 | ajosey | Status | Interpretation Required => Closed |