array error

hrk l8atnight at gmail.com
Mon Jul 21 12:06:27 PDT 2008


yep, true - don't push me to much.

it seems like you are right, the program should work. funny so, when i move an array with initialization declaration up or down in the code, the program excepts at different places, without that the array is used. seems like an error in the compiler.

i am tring to port a c++ library for firebird to d, since i think that the db support needs some more libraries. gui is ok for me but alot of the rest is missing for d.

thank you guys for the replies and the help you offered!

hrk


Koroskin Denis Wrote:

> On Sun, 20 Jul 2008 16:09:38 +0400, bearophile <bearophileHUGS at lycos.com>  
> wrote:
> 
> > Koroskin Denis:
> >> - you can declare array like "int mVector[];" as well as "int[]  
> >> mVector;".
> >
> > I don't agree, the right way to declare it in D is "int[] mVector;".
> >
> > The other way is just for code translated from C (and to confuse  
> > programmers. As the Zen of another language says: "There should be one--  
> > and preferably only one --obvious way to do it."  So I'd probably like  
> > to remove that syntax).
> >
> > Bye,
> > bearophile
> 
> I just didn't want to push the guy too much :)
> Experience comes with time. It's too hard to change habits at once.



More information about the Digitalmars-d-learn mailing list