Skip to content

Glossary: Swift Basics

main.swift

The file in a package target where the program starts. Only `main.swift` may hold top-level statements such as `print(...)`; other files hold only definitions.

Where the book teaches it

Related terms

packagetargetglobal variable