当前位置:网站首页>Literal aggregation
Literal aggregation
2022-04-22 23:53:00 【~Abandoned memories】
1. Boolean
let bool =true // Reverse is false
2. character string
let string =@" Who am I "
3. character
// character ( Storable ASCII character ,Unicode character )
let character: Character =" puppy "
4. Integers
let intDecimal = 17 // Decimal system
let intBinary = 0b1001 // Binary system
let intOctal = o021 // octal
let intHexadecimal = 0x11 // Hexadecimal
5. Floating point numbers
let doubleDecimal = 125.0 // Decimal system , Equivalent to 1.25e2
let doubleHexadecimal1 = 0xFp2 // Hexadecimal , signify 15x2^2, The decimal equivalent of 60.0
let doubleHexadecimal2 = 0xFp-2 // Hexadecimal , signify 15x2^-2, The decimal equivalent of 3.75
/* Integers and floating-point numbers can add extra zeros or underscores to enhance readability for example :100_000, 1_000_000.000_000_1 */
6. Array
let array=[1,3,4,5,7,8];
7. Dictionaries
let dic = ["age":18,"height":20];
8. Tuples
let http404Error = (404,"Not Found")
// http404Error.0 Represents the first value taken out
let (ststusCode,statusMessage) = http404Error
// The representatives will http404Error The two values inside are assigned to the left .
let (jusTheCode,_) = http404Error
//_ Indicates that the parameter is not accepted , It only needs http404Error The first value in 404
let http200Status = (ststusCode:200,des:"OK")
// Carry identifier , When taking value, you can directly point and call http200Status.des
版权声明
本文为[~Abandoned memories]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204222352443036.html
边栏推荐
- 在windows7下安装vs2017插件 GLSL language integration v0.10.120.vsix报错:microsoft.visualc.redist.12
- 80386 compilation_ Introduction to global description table GDT
- 字体自适应
- 【leetcode】二叉树,104二叉树的最大深度,543二叉树的直径,124二叉树的最大路径和
- MPP架构概念
- 【事務管理】
- 重新安装window10
- Solve the error reporting problem of require is not defined
- Use example to add a sort invalidation problem when using PageHelper
- The latest MySQL tutorial is easy to understand
猜你喜欢
![[leetcode] binary tree, 654 largest binary tree, 105 constructs binary tree according to preorder and inorder traversal, 106 constructs binary tree according to inorder and postorder traversal, and 88](/img/7c/435c5f6ed591b81084020bc73c7db7.jpg)
[leetcode] binary tree, 654 largest binary tree, 105 constructs binary tree according to preorder and inorder traversal, 106 constructs binary tree according to inorder and postorder traversal, and 88

Django创建表结构及对数据库增删改查

SystemVerilog verification - Test Platform preparation guide learning notes (0): introduction to verification
![[turtle confession collection]](/img/81/b4bacc23691e58e403f1330d0ca7cf.jpg)
[turtle confession collection] "the moon at the bottom of the sea is the moon in the sky, and the person in front of us is the sweetheart." More joy and peace for the rest of your life ~ (with 3 sourc

Introduction to opencv (II) -- affine transformation and perspective transformation

2022-04-22: give you a matrix board with the size of m x n to represent the deck, where each cell can be a warship 'x' or an empty space ', Returns the number of warships placed on the deck board. war

LeetCode 1446 - 1449

SystemVerilog verification - Test Platform preparation guide learning notes (5): function coverage

visual studio 2019恢复默认设置

Wechat applet page Jump
随机推荐
北京航空航天大学开通CnOpenData试用
IOT identity awareness
"100 million" little technical feelings
[experience sharing] share mangopapa's paper learning experience
The latest MySQL tutorial is easy to understand
Failed to execute goal on project xxxxx
SystemVerilog verification - Test Platform preparation guide learning notes (5): function coverage
彻底解决Failed to execute goal on project xxxxx
80386 compilation_ Introduction to global description table GDT
2022 hard plus deshmann annual summit: release of a variety of pilot flagship to lead the high-end market
Typora样式调优
浅谈LD_PRELOAD劫持
Introduction to opencv (II) -- affine transformation and perspective transformation
Solve the error reporting problem of require is not defined
LabVIEW implements application stop or exit
Tracup|减少压力和更多的成功,帮助您摆脱工作焦虑的利器
人们对于产业互联网的认识越来越清晰,越来越接近产业互联网
[pyGame] can the little dinosaur on chrome be played with code? It looks like fun~
JUC 全套(1)
[leetcode] binary tree, maximum depth of 104 binary tree, diameter of 543 binary tree, maximum path and sum of 124 binary tree