Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在 Inform7 中定义一个列表,但它不起作用。
Contacts is a list {"Melissa", "Paul"};
那是行不通的。你能告诉我如何定义一个可以添加元素的列表吗?
您需要先定义列表包含哪些类型的值,然后才能定义它包含哪些实际值。
Contacts is a list of text that varies. Contacts is {"Melissa", "Paul"}.
这将创建一个可从任何地方访问的全局列表。在规则和短语中,您可以使用简写创建常量列表(在本例中为文本):
Instead of examining the phone book: let contacts be {"Melissa", "Paul"}; ...
(参见第 21.2 节的通知写作。)