Haxe - Print command line arguments

前端 未结 1 655
广开言路
广开言路 2021-01-18 15:40

Using the Haxe programming language, is it possible to print the command line arguments that are passed to an application?

I\'m trying to re-write this Java program

相关标签:
1条回答
  • 2021-01-18 15:49

    Since targets like JS(in browser) and Flash do not have concept of command line arguments. Haxe put such "system" target things in Sys and the top level sys package.

    class Example {
        public static function main():Void {
            for (arg in Sys.args())
                Sys.println(arg);
        }
    }
    
    0 讨论(0)
提交回复
热议问题