​Quick is really a powerful and user-friendly programming language for macOS, iOS, watchOS and...

Page 3

Swift

Table of Contents About the Tutorial .................................................................................................................................. i Audience ................................................................................................................................................ i Prerequisites .......................................................................................................................................... i Execute Swift Online............................................................................................................................... i Disclaimer & Copyright ........................................................................................................................... i Table of Contents .................................................................................................................................. ii

1.

SWIFT – OVERVIEW............................................................................................................ 1

2.

SWIFT – ENVIRONMENT..................................................................................................... 2 Try it Option Online ............................................................................................................................... 2 Local Environment Setup ....................................................................................................................... 2

3.

SWIFT – BASIC SYNTAX....................................................................................................... 6 Import in Swift ...................................................................................................................................... 6 Tokens in Swift ...................................................................................................................................... 6 Comments ............................................................................................................................................. 7 Semicolons ............................................................................................................................................ 7 Identifiers .............................................................................................................................................. 7 Keywords............................................................................................................................................... 8 Whitespaces .......................................................................................................................................... 9 Literals ................................................................................................................................................... 9

4.

SWIFT – DATA TYPES ........................................................................................................ 10 Built-in Data Types .............................................................................................................................. 10 Bound Values ...................................................................................................................................... 11 Type Aliases ......................................................................................................................................... 11 Type Safety .......................................................................................................................................... 12 ii


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.