在terminal中编写并运行swift
➜ swift $ pwd /Users/cyper/swift ➜ swift $ which swift /usr/bin/swift ➜ swift $ swift --version Apple Swift version 2.0 (swiftlang-700.0.59 clang-700.0.72) Target: x86_64-apple-darwin15.0.0 ➜ swift $ ./example.swift hi cyper ./example.swift hi cyper ➜ swift $ cat example.swift #!/usr/bin/swift // A swift comonet! import Foundation for arg in Process.arguments { print(arg) } exit(0) ➜ swift $
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。