Download LambdaCore Database Programmer`s Manual Version 1.3

Transcript
Chapter 1: The LambdaCore Classes
63
key = name[2..length(name)];
else
key = name;
endif
k = index(buckets, key[1]) || else_bucket;
bucket = keys[k];
count = counts[k];
i = 1;
while (i <= count && key > bucket[i])
i = i + 1;
endwhile
names = listset(names, listappend(names[k], name, i - 1), k);
keys = listset(keys, listappend(keys[k], key, i - 1), k);
counts = listset(counts, count + 1, k);
endfor
sorted = {};
for i in [1..length(names)]
sorted = {@sorted, @names[i][2..counts[i]]};
endfor
sorted = {@sorted, "", "", ""};
n = length(sorted) / 4;
su = $string_utils;
for i in [1..n]
player:tell(su:left(sorted[i], 20),
su:left(sorted[i + n], 20),
su:left(sorted[i + n + n], 20),
sorted[i + 3 * n]);
endfor
none print topic (string topic)
1.3 The LambdaCore Utility Classes
The following utility classes are provided in the LambdaCore database:
String Utils. ($string_utils)
This class provides a number of verbs containing string utility
functions.
Building Utils. ($building_utils)
This class provides a couple of verbs used in building commands.
Permissions Utils. ($perm_utils)
This class provides verbs used in manipulating permissions on
objects.
Verb