[DGD] Counting from the end in arrays....

Felix A. Croes felix at dworkin.nl
Tue Sep 22 21:18:06 CEST 1998



On Tue, 22 Sep 1998, Tim Blommerde wrote:

> Got another question for you regarding the DGD variant of LPC.  My question
> is if it's possible to get a certain amount of members counting from the end
> of the array.  For example the last member, or the last three members.  And
> all this without first determining the size of the array.  I know you could
> do something like this:
>     array[ sizeof(array)-3 .. sizeof(array)-1]
> But I want to know if something like this is possible (Amylaar solution):
>     array[<3 .. <1]

DGD has had something similar in the past, but the solution was abandoned
after it turned out to have more drawbacks than advantages (see the
Changelog file for details).  the `<' solution I consider to be a typical
example of the eyesore-causing technological progress common in Amylaar's
driver :)

I have no such change planned, but expect the code optimizer to better
optimize such code in the future.

Dworkin




More information about the DGD mailing list