short programme from "Programming in D" by Ali Cehreli.

Steven Schveighoffer via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jun 14 09:09:00 PDT 2016


On 6/14/16 11:44 AM, Ali Çehreli wrote:
> On 06/14/2016 04:52 AM, Nick B wrote:
>
>> Thanks for the assistance. I assumed that the compiler  would at least
>> throw a line number, to hint at where the problem was.
>
> Further, when the format string is a literal like the one used in the
> program, the compiler can in theory determine at compile time that the
> format string does not match the rest of the arguments:
>
>     readf (" %s, &die");
>     // "No argument for %s"
>
> This is a desired feature but dmd does not have this yet. Since dmd
> provides the front end to gdc and ldc, they don't have this feature either.

Hm... shouldn't it at least require ONE parameter besides the string?

-Steve


More information about the Digitalmars-d-learn mailing list