想象一下,我编译了program.hs文件,其中:
main :: IO ()
main = do a <- getArgs
w <- getContents
...
我的问题是如何在Windows命令行中运行该程序,以便从file.txt接收输入?
答案 0 :(得分:2)
运行程序时使用var player: SKSpriteNode!
override func didMove(to view: SKView) {
guard let player = childNode(withName: "player") as? SKSpriteNode else {
fatalError("player node not loaded")
}
self.player = player
}
输入重定向运算符:
<