[Issue 423] New: dmd ignores empty commandline arguments
Derek Parnell
derek at nomail.afraid.org
Tue Oct 10 16:14:07 PDT 2006
On Tue, 10 Oct 2006 16:47:34 -0600, Hasan Aljudy wrote:
> Derek Parnell wrote:
>> On Tue, 10 Oct 2006 01:39:01 -0700, Walter Bright wrote:
>>
>>> d-bugmail at puremagic.com wrote:
>>>> http://d.puremagic.com/issues/show_bug.cgi?id=423
>>>>
>>>> Summary: dmd ignores empty commandline arguments
>>>> Product: D
>>>> Version: 0.169
>>>> Platform: PC
>>>> OS/Version: Linux
>>>> Status: NEW
>>>> Severity: normal
>>>> Priority: P2
>>>> Component: DMD
>>>> AssignedTo: bugzilla at digitalmars.com
>>>> ReportedBy: thomas-dloop at kuehne.cn
>>>>
>>>> dmd "" a.d
>>>> is interpreted as >dmd a.d<
>>>>
>>>> dmd ''
>>>> is interpteted as >dmd<
>>> That's what it's supposed to do.
>>
>> Why? I would have expected a string of length zero to be passed.
>>
>
> So? It's zero-length string is "nothing", hence ignored.
Huh? If I hold a cup of coffee, then drink it all, do I still hold
nothing or a cup of nothing? A string is a container that holds zero or
more characters, IMHO. An empty string is still a string, it just has no
characters in it. Consider a blank sheet of paper; is it full of 'space'
characters or does it contain nothing? Is it still a page if it has no
characters in it? Consider an array of text lines; if one or more of them
are empty, do we ignore those when printing on a page or do we use that
information?
The strings on a command line contain information even if one of them is
empty - at the very least it is a placeholder.
An empty string is different from a string that is not initialized and
different again from non-existent 'string'.
--
Derek
(skype: derek.j.parnell)
Melbourne, Australia
"Down with mediocrity!"
11/10/2006 9:07:12 AM
More information about the Digitalmars-d-bugs
mailing list