php strings demo
Kagamin
spam at here.lot
Sat Nov 20 13:57:15 PST 2010
Kagamin Wrote:
> See attachment. It's just a thought. Anyone want this in the language?
> ---
> string sval="ab128#d";
> int ival=274;
> static assert("asdf \{sval} astt35 \{ival} zzf \{uuu} g,d" ==
> "asdf ab128#d astt35 274 zzf uuu g,d"); //(uuu not found)
> ---
Wrote some unittests today and thought, this feature is useful when one wants easy sql statements (in, e.g. unittests).
string typeName="Employee";
int[] ids=executeVector!int("select ID from Objects where type='\{typeName}'");
More information about the Digitalmars-d
mailing list