在Haxe有某种退出声明吗?

时间:2018-03-11 08:10:26

标签: haxe

haxe中是否有某种退出声明?像

import sys
sys.exit(0)

在Python或

System.exit(0);
在Java中

P.S。:只需要这个用于sys目标...

1 个答案:

答案 0 :(得分:7)

您可以在sys目标中使用Sys.exit(code)(cpp,cs,hl,java,lua,macro,neko,php,python)。

https://api.haxe.org/Sys.html#exit

对于Flash目标:flash.system.System.exit(code) https://api.haxe.org/flash/system/System.html#exit