我创建了一个小程序:
struct Person{
let firstName: String
let lastName: String
func sayHello() {
print("Part 1")
print(firstName)
print(lastName)
print()
print("Part 2")
print(firstName, lastName, separator:"\n")
print()
print("Part 3")
print(firstName, lastName)
print()
print("Part
print(firstName, terminator:" ")
print(lastName)
print()
}
}
let aPerson = Person(firstName: "x", lastName: "z")
aPerson.sayHello()

但是,我在将此代码转换为终端时遇到了麻烦..
在终端内我想重新创建这个程序..
作为可以从终端执行的已编译的可执行二进制文件。
作为可以从终端执行的脚本文件。
我发现这篇文章: How do I build an executable for an application written in Swift from the terminal?
虽然,我不确定如何解释那个