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

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.

主站蜘蛛池模板: 金华市| 通榆县| 遵义市| 塘沽区| 华宁县| 汤阴县| 武隆县| 桐城市| 温泉县| 珠海市| 高清| 东阿县| 伊宁市| 明光市| 八宿县| 南皮县| 鹤山市| 陇南市| 景东| 东山县| 利川市| 沙湾县| 冀州市| 贺州市| 板桥市| 甘德县| 孟连| 织金县| 鸡东县| 介休市| 高雄市| 来宾市| 海城市| 灵石县| 都匀市| 桦南县| 青川县| 平阳县| 安乡县| 周宁县| 平潭县|