Help with Associative array problems.

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Thu Apr 3 16:35:01 PDT 2008


Spacen Jasset wrote:
> I see ok. This is all very subtle though. Is my solution adding a .dup 
> the best way or can I do something else?

If you need the string after the iteration of the loop in which it was 
bound, .dup is the best way to do so. (The original gets overwritten, so 
make a copy if you need it later -- not rocket science ;) )


Unless you're using D2-series compiler, in which case .idup may be 
better (especially for use as AA keys).


More information about the Digitalmars-d-learn mailing list