官术网_书友最值得收藏!

Hello World!

It's somewhat traditional when learning programming languages to begin with a Hello World example. A Hello World program is simply using your code to display or log the text Hello World. It's always been the general starting point because sometimes just getting your code environment set up and having your code executing correctly is half the battle. At least, this was more the case in older programming languages.

Swift makes this easier than ever, and without going into the structure of a Swift file (which we shall do later on and is also much easier than Objective-C and past languages), here's how you create a Hello World program:

print("Hello, World!")

That's it! That is all you need to have the text Hello World appear in Xcode's debug area output.

主站蜘蛛池模板: 山阴县| 柘城县| 绥芬河市| 隆尧县| 裕民县| 格尔木市| 六枝特区| 孟州市| 鄂尔多斯市| 长沙县| 新乡县| 衡阳市| 五台县| 司法| 格尔木市| 景德镇市| 江北区| 海伦市| 墨竹工卡县| 灵寿县| 洛南县| 正蓝旗| 宁阳县| 河源市| 辽阳县| 宣城市| 盐源县| 阿勒泰市| 门头沟区| 阿拉善左旗| 尉氏县| 中江县| 田东县| 楚雄市| 调兵山市| 镇赉县| 合肥市| 阿坝县| 白朗县| 印江| 砚山县|