|
|
hi,
William F Pokorny <ano### [at] anonymousorg> wrote:
> ... However, I need to test(1) with large dictionaries having
> key hashing collisions to be sure my fixes - as well the previously
> existing code - work correctly.
> ...
> (1) I suspect jr's recent foreach include work will come in handy! :-)
still ongoing but thank you for the vote of confidence. and glad the code will
get a work-out. :-)
quickly cobbled up example of what I think you have in mind, ie automating the
dictionary creation, below. hth.
regards, jr.
#version 3.8;
global_settings {assumed_gamma 1}
#include "foreach.inc"
#declare A = array {
"Aa", "Ab", "Ac", "Ad", "Ae", "Af", "Ag", "Ah", "Ai", "Aj", "Ak", "Al", "Am",
"An", "Ao", "Ap", "Aq", "Ar", "As", "At", "AA", "Av", "Aw", "Ax", "Ay", "Az"
};
#macro mkKeys(i_,j_,elem_,arg_)
#local arg_[elem_] = i_ * j_;
#end
#declare D = dictionary {
.Macro: "mkKeys",
.Walk: 1,
.Extra: on,
.Arg: "R"
};
#declare R = dictionary {
.foo: 0
};
Foreach(A,D)
#debug concat("Az = ",str(R.Az,0,0),".\n")
Post a reply to this message
|
|