How to set exit code value for a command line utility in Swift?

后端 未结 1 1180
灰色年华
灰色年华 2020-12-19 02:09

I can\'t find it in the language reference. The standard template doesn\'t give a clue:

import Foundation

println(\"Calculating\")

// How to set and exit c         


        
相关标签:
1条回答
  • Found it! You should just call:

    exit(yourExitCode)
    
    0 讨论(0)
提交回复
热议问题