Re: arrays in DMD V2

2014-04-19 Thread Ali Çehreli via Digitalmars-d-learn
On 04/19/2014 11:59 AM, steven kladitis wrote: > I am getting a much clearer picture of arrays Great! :) > a D manual or book just for D V2.0. They are all here: http://wiki.dlang.org/Books Ali

Re: arrays in DMD V2

2014-04-19 Thread steven kladitis via Digitalmars-d-learn
Fantastic I am getting a much clearer picture of arrays I appreciate all of the help I see many examples of D online, but most do not compile under 2.065. I am wondering if there is a D manual or book just for D V2.0.

Re: arrays in DMD V2

2014-04-19 Thread Ali Çehreli via Digitalmars-d-learn
On 04/19/2014 09:14 AM, steven kladitis wrote: > // does not work I think you are thinking in terms of C's syntax. Unlike C, array definition syntax is consistent in D. I inserted spaces below to make it stand out: int[] [string] arr; The definition above is in the following form:

Re: arrays in DMD V2

2014-04-19 Thread Jesse Phillips via Digitalmars-d-learn
On Saturday, 19 April 2014 at 16:14:45 UTC, steven kladitis wrote: void main() { //inta0[]; int[] a0; //inta1[][]; int[][] a1; //string a2[][]; string[][] a2; //string a3[][string]; string[string] a3; // string[][string] a3; // possibly should be above for a3 //string a4[][string][strin

Re: arrays in DMD V2

2014-04-19 Thread steven kladitis via Digitalmars-d-learn
void main() { //inta0[]; int[] a0; //inta1[][]; int[][] a1; //string a2[][]; string[][] a2; //string a3[][string]; string[string] a3; // string[][string] a3; // possibly should be above for a3 //string a4[][string][string]; string[][string][string] a4; //string a4[string][string][string]

Re: arrays in DMD V2

2014-04-18 Thread Jesse Phillips via Digitalmars-d-learn
On Saturday, 19 April 2014 at 03:51:02 UTC, steven kladitis wrote: import std.stdio; void main() { inta0[]; inta1[][]; string a2[][]; string a3[][string]; string a4[][string][string]; //string a4[string][string][string]; is this the same as above inta5[][string][string][strin

Re: arrays in DMD V2

2014-04-18 Thread Ali Çehreli via Digitalmars-d-learn
On 04/18/2014 08:47 PM, steven kladitis wrote: Thanks, I am trying to understand what I am doing. The docs seem unclear to me on how to initialize these. I think there are three ways. with brackets , the other with foreach or direct assignments. -- here is a longer version -- uncomment out the

Re: arrays in DMD V2

2014-04-18 Thread steven kladitis via Digitalmars-d-learn
import std.stdio; void main() { inta0[]; inta1[][]; string a2[][]; string a3[][string]; string a4[][string][string]; //string a4[string][string][string]; is this the same as above inta5[][string][string][string]; inta6[string][int][string][float]; inta7[int][int][string]

Re: arrays in DMD V2

2014-04-18 Thread steven kladitis via Digitalmars-d-learn
Thanks, I am trying to understand what I am doing. The docs seem unclear to me on how to initialize these. I think there are three ways. with brackets , the other with foreach or direct assignments. -- here is a longer version -- uncomment out the assignments to see the errors I get. -- I am t

Re: arrays in DMD V2

2014-04-18 Thread Jesse Phillips via Digitalmars-d-learn
On Saturday, 19 April 2014 at 00:27:32 UTC, steven kladitis wrote: import std.stdio; void main() { inta0[]; inta1[][]; string a2[][]; string a3[][string]; string a4[][string][string]; //string a4[string][string][string]; is this the same as above inta5[][string][string][strin

arrays in DMD V2

2014-04-18 Thread steven kladitis via Digitalmars-d-learn
import std.stdio; void main() { inta0[]; inta1[][]; string a2[][]; string a3[][string]; string a4[][string][string]; //string a4[string][string][string]; is this the same as above inta5[][string][string][string]; inta6[string][int][string][float]; inta7[int][int][string]