Latest string_token Code

Ben Hanson Ben.Hanson at tfbplc.co.uk
Tue Jun 22 04:21:40 PDT 2010


== Quote from bearophile (bearophileHUGS at lycos.com)'s article
> Ben Hanson:
> > It still needs some work as memmove works with bytes so I need the
> > equivalent of 'sizeof' in D for this.
> T.sizeof gives the size of the init of a variable of type T.
> If T is a dynamic array it returns wordsSize*2, so if you need the item size you
can write T[0].sizeof.
> Why do you use so many underscores?
> Bye,
> bearophile

D'oh! I think I've seen that about now you mention it...

The underscores thing just comes from the C++ source. I was recommended that
approach, as not wanting to use Reverse Polish Notation (i.e. MFC style), the
underscores allow you to have a type the same name as a member var or local var.

Thanks,

Ben


More information about the Digitalmars-d mailing list