Using the result of a comma expression is deprecated

Suliman via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Nov 27 08:32:26 PST 2016


> Looks like you forgot a call to format before the opening 
> parenthesis.
>
> should be:
> string sqlinsert = format(`INSERT INTO usersshapes (userlogin,
>  uploading_date, geometry_type, data) VALUES ('%s', '%s', '%s',
>  '%s') `, login, uploading_date, geometry_type, data);
>
> because what ends up happening is :
>     string sqlinsert = data;
> which is almost certainly not what you want.

So all string substitute must be called with `format`?


> because what ends up happening is :
>     string sqlinsert = data;
> which is almost certainly not what you want.

I thought it's possible to write:

string data = "foo"
string sqlinsert = data

or am I wrong?




More information about the Digitalmars-d-learn mailing list