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 was

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

2018-12-16 Thread Steven Schveighoffer via Digitalmars-d-learn
s 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] Hm... maybe a runtime error? I didn't think the compiler knows to complain about this. What? Is

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 by t

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 precedenc

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 used was: rdmd

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. `format` uses C style