First time contact with swift Apple language

Source: Internet
Author: User

Just finished u3d RPG game production, and recently in the study of a plug-in, Cameerapath, feel pretty diao, a lot of games have used this plugin, plug-in principle is interpolation operation. I will not say here, today, after learning C #, suddenly want to study the latest Apple programming language Swift, do not learn not to know Ah, a bit on the love, Apple is indeed in the mouth. Here's how Xcode writes Swift's Hello,world.


Open Xcode to create a command line Tool under Application


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/59/84/wKioL1TWEfSyQGRlAAEuVGr7s8o181.jpg "title=" 866c6545-3407-470f-a7bf-0a5f0773e577.png "alt=" Wkiol1twefsyqgrlaaeuvgr7s8o181.jpg "/>


and write it in our new script.



Import Foundation


println ("Hello, world!" )//print Hello, world


Let max= 10//constant

var cur= 10//variable

var end= 0//variable


End = Max + cur


println (end)//Print effect

println (cur)


Output result 650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/59/84/wKioL1TWIyLxEcVJAABHbQ_ZwCM264.jpg "title=" 2882c955-3bbb-442a-9157-6bf7995df65d.png "alt=" Wkiol1twiylxecvjaabhbq_zwcm264.jpg "/>


Feeling a little bit like Lua's feeling, isn't it cool

This article is from "Cool Little Joe" blog, please be sure to keep this source http://5152481.blog.51cto.com/5142481/1612723

First time contact with swift Apple language

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.