Mirage Source http://web.miragesource.net/forums/ |
|
Dynamic Arrays http://web.miragesource.net/forums/viewtopic.php?f=193&t=6259 |
Page 1 of 1 |
Author: | Anthony [ Thu Oct 01, 2009 3:48 am ] |
Post subject: | Dynamic Arrays |
Robin, for one, is always talking about dynamic arrays and I was wondering if somebody could shed some light on it for me. I could probably Google it I guess but thought it would be easier if I got a Mirage example/explanation. Thanks. |
Author: | GIAKEN [ Thu Oct 01, 2009 4:07 am ] |
Post subject: | Re: Dynamic Arrays |
Ummm... Code: DynamicArray() As DynamicArrayRec Increase the array's size by 1: Code: ReDim Preserve DynamicArray(1 To UBound(DynamicArray) + 1) Decrease by 1: Code: ReDim Preserve DynamicArray(1 To UBound(DynamicArray) - 1)
|
Author: | Toast [ Wed Oct 07, 2009 3:52 am ] |
Post subject: | Re: Dynamic Arrays |
That's really confusing how VB6 arrays start from one and not zero =/ |
Author: | Aaron [ Wed Oct 07, 2009 4:53 am ] |
Post subject: | Re: Dynamic Arrays |
VB6 arrays do start from zero. They only start from a different value if specified. |
Author: | Matt [ Wed Oct 07, 2009 5:51 am ] |
Post subject: | Re: Dynamic Arrays |
Aaron wrote: VB6 arrays do start from zero. They only start from a different value if specified. Yupp. |
Author: | GIAKEN [ Wed Oct 07, 2009 6:30 am ] |
Post subject: | Re: Dynamic Arrays |
I prefer to start my arrays at 2. |
Author: | Robin [ Wed Oct 07, 2009 7:26 am ] |
Post subject: | Re: Dynamic Arrays |
GIAKEN wrote: I prefer to start my arrays at 2. You also start lunch at 9am, finishing at 3pm. |
Author: | GIAKEN [ Wed Oct 07, 2009 3:17 pm ] |
Post subject: | Re: Dynamic Arrays |
Robin wrote: GIAKEN wrote: I prefer to start my arrays at 2. You also start lunch at 9am, finishing at 3pm. Actually around 3pm is when I start, which is when I wake up, and normally end around midnight, where I pass out and repeat the process. |
Author: | genusis [ Wed Oct 14, 2009 5:33 pm ] |
Post subject: | Re: Dynamic Arrays |
isn't dynamic arrays just Normal arrays being redimed AS a bigger variable? EXAMPLE ReDim Map.Tile(0 To Map.MaxX, 0 To Map.MaxY) |
Author: | GIAKEN [ Wed Oct 14, 2009 8:06 pm ] |
Post subject: | Re: Dynamic Arrays |
Yeah. ReDim clears out the whole array. ReDim Preserve doesn't clear the array out. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |