ActionScript 2.0 中有类似 C#define 的东西吗?
我正在寻找一种在 AS 2.0 中编写大表达式的更短方法,我可以通过使用 #define 在 C 中完成。 AS 2.0 中有什么可以让我这样做吗?
I'm looking for a shorter way to write a big expression in AS 2.0, which I could accomplish in C by using #define. Is there anything in AS 2.0 that allows me to do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有人找到了一种在actionscript上使用cpp预处理器的方法:here
但是,除非您有充分的理由并且已经权衡了干净地执行此操作的性能并发现硬编码明显更好,否则我建议只在函数中执行表达式(过早的优化是没有好处的)
Someone found a way to use the cpp preprocessor on actionscript: here
However, unless you have a very good reason and have already weighed the performance of doing it cleanly and found hardcoding significantly better, I would recommend just doing your expressions in a function (premature optimization is no good)