Re: Reuse/reset dynamic rectangular array?

2019-05-28 Thread Steven Schveighoffer via Digitalmars-d-learn
On 5/28/19 4:58 PM, Robert M. Münch wrote: On 2019-05-28 01:52:28 +, 9il said: myRectData[] = null; :-/ Ok... doesn't look to complicated ;-) Still learning a lot about D... Keep in mind, this does not reuse the allocated arrays, it simply resets them to point at nothing (and will

Re: Reuse/reset dynamic rectangular array?

2019-05-28 Thread Robert M. Münch via Digitalmars-d-learn
On 2019-05-28 01:52:28 +, 9il said: myRectData[] = null; :-/ Ok... doesn't look to complicated ;-) Still learning a lot about D... -- Robert M. Münch http://www.saphirion.com smarter | better | faster

Re: Reuse/reset dynamic rectangular array?

2019-05-27 Thread 9il via Digitalmars-d-learn
On Saturday, 25 May 2019 at 16:17:40 UTC, Robert M. Münch wrote: On 2019-05-25 14:28:24 +, Robert M. Münch said: How can I reset a rectangualr array without having to loop through it? int[][] myRectData = new int[][](10,10); myRectData.length = 0; myRectData[].length = 0;

Re: Reuse/reset dynamic rectangular array?

2019-05-25 Thread Robert M. Münch via Digitalmars-d-learn
On 2019-05-25 14:28:24 +, Robert M. Münch said: How can I reset a rectangualr array without having to loop through it? int[][] myRectData = new int[][](10,10); myRectData.length = 0; myRectData[].length = 0; myRectData[][].length = 0; They all give: slice expression

Re: Reuse/reset dynamic rectangular array?

2019-05-25 Thread matheus via Digitalmars-d-learn
On Saturday, 25 May 2019 at 14:28:24 UTC, Robert M. Münch wrote: How can I reset a rectangualr array without having to loop through it? int[][] myRectData = new int[][](10,10); myRectData.length = 0; myRectData[].length = 0; myRectData[][].length = 0; They all give: