๐Ÿ”ฐstatement

๐Ÿšง ๆ–ฝๅทฅไธญ

Swift โŸฉ statement

Swift code consists of statements.

  • syntax features

  • kinds of statements

    • simple statement - consists of

      • an expression โญ๏ธ (evaluated to a value)

      • or a declaration โญ๏ธ (define new variable or type)

    • flow control

    • compiler control statement

      • conditional compilation block (#if ... #endif) ๐Ÿšง

      • line control statement (#sourceLocation) ๐Ÿšง

      • compile-time diagnostic statement (#error, #warning) ๐Ÿšง

    • other statements

      • do statement

      • defer statement ๐Ÿšง

      • labeled statement ๐Ÿšง

      • availability condition (#available, ...) ๐Ÿšง

Last updated