Newbie GDC issues

Ramon spam at thanks.no
Thu Sep 5 16:49:17 PDT 2013


On D's, and in particular GDC's, way to conquer the world there 
will evidently be many newbies to notice D, look at it, be drawn 
to it (and be happily trapped).

I am such a newbie and the idea behind this thread is to collect 
all the issues, quirks and nuisances a newbie might encounter.
Please note that quite typically this is not to do with GDC being 
at fault but rather with a newbie naturally not yet knowing all 
the ins and outs (like, e.g. that with GDC one must use "-fdebug" 
and not "-debug" as with dmd).

I assume that for most issues someone more experienced will step 
in and provide an explanation, a solution or a workaround or just 
some magic *g

So, here goes:

-------------

char[] someDynArray;

// in main, after someDynArray is somehow init'd...

      char c;
      for(int i = 0; i < someDynArray; i++)
         c = someDynArray[i];

Now, in the debugger:

> print someDynArray
// whatever it happens to hold. Works fine.

> print someDynArray[i]
Structure has no component named operator[].

Any ideas?


More information about the D.gnu mailing list