Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
【Go言語】リテラル
Search
Tomoki Ota
July 08, 2024
0
110
【Go言語】リテラル
リテラルについてまとめました。
現在、数値リテラルのみ書いてます。後日更新予定です。
【Qiita】
【Go言語】n進数
Tomoki Ota
July 08, 2024
Tweet
Share
More Decks by Tomoki Ota
See All by Tomoki Ota
アーキテクチャの価値
tomo1227
0
68
アーキテクチャとビジネスロジック
tomo1227
0
73
【Go言語】テスト
tomo1227
0
42
【Go言語】クロージャ
tomo1227
0
230
【Go言語】イテレータ
tomo1227
0
53
【Go言語】エラーハンドリング
tomo1227
0
50
AIに淘汰されないようにするには?
tomo1227
0
44
【Go言語】range
tomo1227
0
45
【Go言語】break
tomo1227
0
52
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
270
20k
BBQ
matthewcrist
89
9.7k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.8k
Six Lessons from altMBA
skipperchong
28
3.8k
Unsuck your backbone
ammeep
671
58k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
Mobile First: as difficult as doing things right
swwweet
223
9.7k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
20k
Transcript
Tomoki Ota ʲGoݴޠʳϦςϥϧ
Ϧςϥϧ
2ਐ 8ਐ 16ਐ ෳૉ ΞϯμʔείΞ
͑ 120Ͱͳ͘ɺ116Ͱ͢
ղઆ 0Λ͚ͭΔͱ8ਐʹͳΔɻ 100 + 020 = 100 + 16 =
116
2ਐ 0bɺ0Bͷpre f ixΛ͚ͭΔɻ e.g. 0b1010
2ਐ Ϗοτԋࢉͷྫ
8ਐ 0, 0oͷpre f ixΛ͚ͭΔɻ e.g. 012
8ਐ ϑΝΠϧͷύʔϛογϣͷ༩ͷྫ
16ਐ 0xɺ0Xͷpre f ixΛ͚ͭΔɻ e.g. 0x3F
16ਐ ϙΠϯλ16ਐ
ෳૉ iͷsuf f ixΛ͚ͭΔɻe.g. 3+4i complex128ͱcomplex64ͱͯ͠ એݴ͢Δ͜ͱՄೳɻ
ෳૉ
ΞϯμʔείΞ ࣈΛಡΈ͘͢͢ΔͨΊʹɺ ۠Γจࣈͱͯ͠ _ Λ͑Δɻ e.g. 1ԯ : 100_000_000 10ਐҎ֎Ͱ༻Մೳɻ