It was during practice at Myplayground.(https://i.stack.imgur.com/CXHAv.jpg)
I've just started the programming grammar on swift, and it's a basic one, but I don't know why I get an error.
When Swift2 changed to Swift3, the calling convention of the function was changed.Swift2 omitted the argument name label by default for the first argument only (which was close to Objective-C naming convention), but Swift3 needed to label the first argument with an external argument name to prioritize grammatical consistency.
https://github.com/apple/swift-evolution/blob/master/proposals/0046-first-label.md
In other words, areaOfTrianableWithBase(3,andHeight:4)
is correct on Swift2, but compilation error on Swift3.
Correctly label the first argument with an external argument name and call it as follows:
areaOfTribleWithBase(base:3, andHeight:4)
568 Who developed the "avformat-59.dll" that comes with FFmpeg?
599 GDB gets version error when attempting to debug with the Presense SDK (IDE)
887 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
567 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.