C and derivatives have argc and argv (and envp) parameters to their entry point functions, but Swift doesn't have one proper: top-level code is just code and it doesn't have parameters.
argc
argv
envp
How can one access the equivalent of argc and argv in a Swift program?
Process was just renamed into CommandLine (since Swift 3.0 August 4 snapshot)
let arguments = CommandLine.arguments
(for some reason this wasn't mentioned on the changelog)
1.4m articles
1.4m replys
5 comments
57.0k users