What is: Orphan format arguments: args[0..1]
anonymous via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Mar 15 12:27:47 PDT 2015
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:
> string s = "{0}".format(cast(int)d2[i]);
It means you gave `format` more arguments than placeholders.
`format` uses C style % placeholders, not the brace syntax like
C#(?).
So make that:
string s = "%s".format(cast(int)d2[i]);
By the way, I don't see a need for the cast.
More information about the Digitalmars-d-learn
mailing list