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

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.

主站蜘蛛池模板: 高唐县| 常山县| 剑阁县| 安义县| 招远市| 正安县| 四平市| 全南县| 朝阳市| 商都县| 大港区| 资阳市| 资源县| 闽清县| 湘西| 什邡市| 星子县| 涿鹿县| 繁昌县| 东城区| 辽阳县| 子长县| 四会市| 梅河口市| 清原| 玉林市| 伊宁县| 安阳市| 荃湾区| 南乐县| 图片| 南召县| 嵩明县| 惠州市| 甘孜| 永修县| 渝北区| 南投市| 长海县| 定南县| 高安市|