%% /tree-example public
new-tree mytree key-as "positive integer"
set-number i
start-loop use i start-with 0 repeat 1000000
number-string i to key
set-string data=key
write-tree mytree key (key) value data
end-loop
start-loop use i start-with 0 repeat 1000000
number-string i to key
read-tree mytree equal (key) status st value data
if-true st not-equal GG_OKAY
@Could not find key <<p-out key>>
else-if
@Found data <<p-out data>> associated with key <<p-out key>>
end-if
delete-string key
end-loop
%%
Copied!