Ios Development notes, ios development
1. We all know that c # java has an entry main function, but swift does not have it in the code. But if there is main. swift, let's take the entry of the program in this file! In addition, files cannot be deleted. If the deletion program cannot be compiled
2. Basic Syntax: Use let to declare constants and var to declare variables. Generally, the type of the defined variables corresponds to the value.
Let a = 10; if a constant is assigned a value, it cannot be assigned a second value. That is to say, the constant value cannot be changed.
Var B = 10; you can also define multiple values (tuples) var c = (100, 30) or give the name var c = (money:, name: "ysq "). Access c. money
Var c = [1, 3, 4, 45] defines the number axis and accesses the subscript
Note: When programming, you can write a semicolon instead of a space.