D - deleting array element
- Pavel Minayev (9/9) Feb 01 2002 It'd be great to have some operator, or method, or something
-
Carlos Santander B.
(25/25)
Mar 23 2003
"Pavel Minayev"
escribiσ en el mensaje
It'd be great to have some operator, or method, or something to delete an element of the dynamic array quickly. Currently this is done like that: array = array[0 .. index] ~ array[index + 1 .. array.length]; But it's quite a lot of typing... something like this is shorter, and just looks better: array.remove(index); -- or -- delete[index] array;
Feb 01 2002
"Pavel Minayev" <evilone omen.ru> escribiσ en el mensaje news:a3em3k$24um$1 digitaldaemon.com... | It'd be great to have some operator, or method, or something | to delete an element of the dynamic array quickly. Currently | this is done like that: | | array = array[0 .. index] ~ array[index + 1 .. array.length]; | | But it's quite a lot of typing... something like this | is shorter, and just looks better: | | array.remove(index); | | -- or -- | | delete[index] array; | | This is a great idea! Carlos Santander --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.463 / Virus Database: 262 - Release Date: 2003-03-17
Mar 23 2003