[DGD] mapping question
pete at ana.sk
pete at ana.sk
Wed Oct 10 17:59:29 CEST 2001
> Nothing stops you from doing this:
>
> ...
>
> for (i = 0; i < sz; i++) {
> map[ind[i]] = <expression>;
> }
>
> What is the problem there? Using an integer index as 'alias' for
> map[i] would cause problems anyway, imagine for instance what would
> happen if the mapping would be changed during the for() loop, an item
> added, one removed, etc. This way actually works safely.
I was just asking if there is not some FASTER way then this,
cause this needs to generate array of indices first. I'm doing it this
way already. And i'm also aware of problems with could do it if
items would be changed during loop. Well then it means this is
only way so it must be fast enough :)
Pete
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list