Change representation of dynamic arrays?

Janice Caron caron800 at googlemail.com
Sat Oct 20 00:15:07 PDT 2007


On 10/20/07, Janice Caron <caron800 at googlemail.com> wrote:
> On 10/20/07, Daniel Keep <daniel.keep.lists at gmail.com> wrote:
> > tst.end   = str.start + ((str.end-str.start)-e)*wchar.sizeof;
>
> tst.end = str.end - e*wchar.sizeof;

See, the $ wouldn't expand to (str.end-str.start) as you implied, it
would expand to ((str.end-str.start)/wchar.sizeof). Obviously the two
str.starts cancel each other out, so you can adjust the end pointer
(relative to $) without looking at the start pointer at all.



More information about the Digitalmars-d mailing list