On Sat, 21 Apr 2012 18:25:44 -0400, Ali Çehreli wrote:
In D, arrays are what they should have been in C :). A pointer and a
size. Something the equivalent of the following (for the int type):
struct int_Array
{
int * elements;
size_t number_of_elements;
}
Technically speaking, th
On 04/22/2012 03:17 PM, Stephen Jones wrote:
> Thanks for the replies. I am still uncertain about something. The
> documentation distinguishes between dynamic slices (int[5] a = new
> int[5])
The documentation may be incorrect because int[5] is never a slice. It
is a fixed-length array.
As an
On Sunday, 22 April 2012 at 23:01:26 UTC, jerro wrote:
On Sunday, 22 April 2012 at 22:17:11 UTC, Stephen Jones wrote:
Thanks for the replies. I am still uncertain about something.
The documentation distinguishes between dynamic slices (int[5]
a = new int[5]) which are managed by the runtime, an
On Sunday, 22 April 2012 at 22:17:11 UTC, Stephen Jones wrote:
Thanks for the replies. I am still uncertain about something.
The documentation distinguishes between dynamic slices (int[5]
a = new int[5]) which are managed by the runtime, and stack
allocated arrays (int[5] b). The problem I have
Thanks for the replies. I am still uncertain about something. The
documentation distinguishes between dynamic slices (int[5] a =
new int[5]) which are managed by the runtime, and stack allocated
arrays (int[5] b). The problem I have is this. I want to be
loading vertex positions and tex-coords
On 4/22/12, Stephen Jones wrote:
> My C programming lies in cobwebs but from memory an array was a
> pointer to the zeroth index of a set of uniformly sized chunks of
> memory. I am perplexed to find that in D a call to an array (of
> float vertices for example) cannot be accomplished by handing &
On 04/21/2012 03:05 PM, Stephen Jones wrote:
> My C programming lies in cobwebs but from memory an array was a pointer
> to the zeroth index of a set of uniformly sized chunks of memory.
Yes and no. :) What you are describing is the feature where an array
decays to what you describe.
But there
My C programming lies in cobwebs but from memory an array was a
pointer to the zeroth index of a set of uniformly sized chunks of
memory. I am perplexed to find that in D a call to an array (of
float vertices for example) cannot be accomplished by handing &v
to functions that need the zeroth in