RosettaCodeData/Task/Associative-array-Creation/Inform-7/associative-array-creation-...

19 lines
512 B
INI

Hash Bar is a room.
Connection relates various texts to one number. The verb to be connected to implies the connection relation.
"foo" is connected to 12.
"bar" is connected to 34.
"baz" is connected to 56.
When play begins:
[change values]
now "bleck" is connected to 78;
[check values]
if "foo" is connected to 12, say "good.";
if "bar" is not connected to 56, say "good.";
[retrieve values]
let V be the number that "baz" relates to by the connection relation;
say "'baz' => [V].";
end the story.