people[name=="Andrew"].friends ~= peter
Thomas Kuehne
thomas-dloop at kuehne.cn
Mon May 8 06:07:31 PDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
antonio schrieb am 2006-05-07:
<snip>
> ¿Standard D offers some way to build a dynamic array on the fly? (like
> c#, java)
>
> Person someone = new Person();
> Person anotherone = new Person();
>
> int count = new Person[]{ someone, anotherone }; // Hoy do you do
> this on D?
shouldn't this be:
# Person[] count = new Person[]{ someone, anotherone };
D kludge:
#
# template makeDynArray(T){
# T[] makeDynArray(T[] raw ...){
# return raw.dup;
# }
# }
#
#
# Person[] count = makeDynArray!(Person)(someone, anotherone);
#
Thomas
-----BEGIN PGP SIGNATURE-----
iD0DBQFEX0KM3w+/yD4P9tIRAmpKAJiMFtf5O+Rwk40lwN1BRZtK6mo9AJYwC5e9
vvb3XmuoYeQbRXm2340Y
=Knpn
-----END PGP SIGNATURE-----
More information about the Digitalmars-d
mailing list