[英]Can entity variables be functions?
Since functions and actions are first-class, is it possible for an entity variable to hold a function? 由于函数和动作是一流的,因此实体变量是否可以容纳函数? Historically that was not the case;
从历史上看并非如此; entity variables could only be flags, counters, trails, or literals.
实体变量只能是标志,计数器,尾迹或文字。
A corollary to that, if the answer is true. 如果答案是正确的,那么这是必然的。 Can a function be defined in a postlude and assigned directly to an entity variable?
可以在后奏中定义函数并将其直接分配给实体变量吗?
(This is a question from the CS 462 mailing list .) (这是来自CS 462邮件列表的问题 。)
否。实体变量只能包含字符串和数字,数组,结构及其任何组合。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.