You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first sentence of the pentultimate paragraph in the Language Guide's Value Bindings subsection reads:
After the temporary constants are declared, they can be used within the case’s code block.
Cases don't have code blocks, they have bodies. The distinction is that a code block is a parenthesized sequence of one or more statements, whereas a case body is a sequence of one or more statements. Unlike C and its derivative languages, a code block may not be substituted for a statement.
Correction
Change the first sentence of pentultimate paragraph in the Language Guide's Value Bindings subsection to read:
After the temporary constants are declared, they can be used within the case’s body.
The text was updated successfully, but these errors were encountered:
Location
https://docs.swift.org/swift-book/documentation/the-swift-programming-language/controlflow#Value-Bindings
Description
The first sentence of the pentultimate paragraph in the Language Guide's Value Bindings subsection reads:
After the temporary constants are declared, they can be used within the case’s code block.
Cases don't have code blocks, they have bodies. The distinction is that a code block is a parenthesized sequence of one or more statements, whereas a case body is a sequence of one or more statements. Unlike C and its derivative languages, a code block may not be substituted for a statement.
Correction
Change the first sentence of pentultimate paragraph in the Language Guide's Value Bindings subsection to read:
After the temporary constants are declared, they can be used within the case’s body.
The text was updated successfully, but these errors were encountered: