Re: Orphan format arguments: args[0..1]

2018-12-16 Thread Ali Çehreli via Digitalmars-d-learn
On 12/16/2018 12:00 PM, Steven Schveighoffer wrote: >> Now there is a compilation error: >> >>Orphan format arguments: args[0..1] > > Hm... maybe a runtime error? I didn't think the compiler knows to > complain about this. Sorry, it was a runtime error. (I wa

Re: Orphan format arguments: args[0..1]

2018-12-16 Thread Steven Schveighoffer via Digitalmars-d-learn
good number but one needs to know" ~ " what the question exactly was.".format(42); Now there is a compilation error:   Orphan format arguments: args[0..1] Hm... maybe a runtime error? I didn't think the compiler knows to complain about this. What? I

Re: Orphan format arguments: args[0..1]

2018-12-16 Thread bauss via Digitalmars-d-learn
auto s = "%s is a good number but one needs to know" ~ " what the question exactly was.".format(42); Now there is a compilation error: Orphan format arguments: args[0..1] What? Is that a bug in format? It can't be because the string should be concatenated

Orphan format arguments: args[0..1]

2018-12-15 Thread Ali Çehreli via Digitalmars-d-learn
" what the question exactly was.".format(42); Now there is a compilation error: Orphan format arguments: args[0..1] What? Is that a bug in format? It can't be because the string should be concatenated by the compiler as a single string, no? No: operator dot has prec

Re: What is: Orphan format arguments: args[0..1]

2015-03-15 Thread Charles Hixson via Digitalmars-d-learn
On 03/15/2015 12:27 PM, anonymous via Digitalmars-d-learn wrote: On Sunday, 15 March 2015 at 18:46:52 UTC, Charles Hixson wrote: What is: Orphan format arguments: args[0..1] It appears to come from within unittest at the line: strings="{0}".format(cast(int)d2[i]); It

Re: What is: Orphan format arguments: args[0..1]

2015-03-15 Thread anonymous via Digitalmars-d-learn
On Sunday, 15 March 2015 at 18:46:52 UTC, Charles Hixson wrote: What is: Orphan format arguments: args[0..1] It appears to come from within unittest at the line: strings="{0}".format(cast(int)d2[i]); It means you gave `format` more arguments than placeholders. `form

What is: Orphan format arguments: args[0..1]

2015-03-15 Thread Charles Hixson via Digitalmars-d-learn
What is: Orphan format arguments: args[0..1] It appears to come from within unittest at the line: strings="{0}".format(cast(int)d2[i]); d2 is: ubyted2[]; It should be 512 bytes long, but that hasn't been checked at the point of the error. The compilation