开发者

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, count开发者_如何学编程ers, 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.)


No. Entity variables can only contain strings and numbers, arrays, structs, and any combination of such.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜