35 lines
440 B
Plaintext
35 lines
440 B
Plaintext
show_sdiff(record u, x)
|
|
{
|
|
record r;
|
|
text s;
|
|
|
|
r.copy(u);
|
|
|
|
for (s in x) {
|
|
if (r.key(s)) {
|
|
r.delete(s);
|
|
} else {
|
|
r.p_integer(s, 0);
|
|
}
|
|
}
|
|
|
|
r.vcall(o_, 0, "\n");
|
|
}
|
|
|
|
new_set(...)
|
|
{
|
|
record r;
|
|
|
|
ucall(r_p_integer, 1, r, 0);
|
|
|
|
r;
|
|
}
|
|
|
|
main(void)
|
|
{
|
|
show_sdiff(new_set("John", "Bob", "Mary", "Serena"),
|
|
new_set("Jim", "Mary", "John", "Bob"));
|
|
|
|
0;
|
|
}
|