Anonymous | Login | 2024-04-25 18:14 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||
ID | Category | Severity | Type | Date Submitted | Last Update | ||
0000417 | [1003.1(2008)/Issue 7] Shell and Utilities | Editorial | Clarification Requested | 2011-04-22 23:11 | 2013-04-16 13:06 | ||
Reporter | jilles | View Status | public | ||||
Assigned To | ajosey | ||||||
Priority | normal | Resolution | Accepted As Marked | ||||
Status | Closed | ||||||
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 Note: 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 | ||||||
Attached Files | |||||||
|
Relationships | ||||||
|
Issue History | |||
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 Note: 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 |
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |