Original articles, welcome reprint. Reprint Please specify: Dongsheng's BlogUse Var or let?In the course of our development, when is the definition of the keyword Var, or is it defined as let?Actually AH all can satisfy our demand, then how should
使用let来声明常量,使用var来声明变量Variable
Oc
Define re-initialize firstint num; num = 10
Simultaneous initialization of the definitionint num = 20
Swift
Define re-initialize firstvar num
Error: No
This article mainly introduces the system constants and variables commonly used in thinkphp, and the required friends can refer to the following
----------------------------------------the system variables and constants used in the template---------
First, the basic knowledge:
Common data types: Int,short,char, etc., note: Nullable data types
A) integer type1) signed integer: Sbyte,short,int,longL sbyte occupies 1 bytes (8 bits), Value range: 128 ~127L Short occupies 2 bytes (16
First, the dataPicture text and so on are data, stored in the computer with 0 and 1. 1. ClassificationData is divided into static data and dynamic Data.(1) static data: Some permanent data, generally stored in the hard disk, as long as the hard
Defined
letDefines constants that are not allowed to be modified once assigned
varDefine variables that can still be modified after assignment
//: # 常量//: 定义常量并且直接设置数值let x = 20//: 常量数值一经设置,不能修改,以下代码会报错// x = 30//: 使用 `:
Identifier:Composition: 26 English letters case, number, 0-9, symbol: $,_Rules:1. Number can not start (1AB)2. Cannot use keyword (class)Java is strictly case sensitiveSome naming conventions in Java:1. Package Name: Xxyyzz ...2. Class
Definitions of constants in Javapublic class first{static final int year=365; Declaring a constantpublic static void Main (string[] args){System.out.println ("Two years equals" +2*year+ "Day");}}Definition of variables in Javapublic class
First release, but also in the revision of the perfect.In a program run, the amount whose value cannot be changed becomes a constant. In the basic data type, constants can be divided into integer constants, real constants, symbolic constants, and
C language data, constants, and variablesPicture text, etc. are data, in the calculation of 0 and 1 storageI. ClassificationData is divided into static data and dynamic Data.1. Static data: Some permanent data, generally stored in the hard disk, as
: Playground-noun:a place where people can playimport uikitvar str = "Hello, Playground"//Constants defined with Letlet Maxlogincount = 10//variable is defined with Varvar Currentlogincount = 0currentLoginCount = 3//Define multiple variables or
1. Variables (variable) 1.1 We manipulate the data in the storage space through variables, the variables refer to this storage space! The spatial location is deterministic, but what values are placed inside are not deterministic! 1.2 Java is a
1.Java Operating principleCompiled + interpreted language:The program code is compiled and converted to an intermediate language called the Java bytecode (. Class file) File.java---"Class.classThe Java Virtual machine JVM interprets bytecode as
1. Constants
Data types in constants can only be Boolean, numeric (integer, float, and plural) and string
Definition Format: const identifier [Type] = value, [type] can be omitted, the compiler infers its type based on the value of the
1 , JavaScript ConceptJavaScript is a scripting language; After writing, you can run it directly (the process of compiling is missing)2 , JavaScript DevelopmentLiveScript + JavaScript = Jscript = ECMAScript (standard for scripting languages)||
One, binary 1.1 binary 1.1 introductionBinary data is a number represented by 0 and 12 digits. Its base is 2, the rounding rule is "every two in 1", Borrow rule is "borrow one when two". The current computer system is basically using binary systems.1
Underlying type
Although Swift is a new programming language designed to develop iOS and OS X apps, Swift's many features are similar to those of C and objective-c.
Swift also provides basic data types similar to C and objective-c, including
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.