Variables

Today I’ve learned all of variables in Golang:

var a int8 = -11
//
1byte

var b int16 = 32000
2bytes

var c int32 = 1000000000
4bytes

var d int64 = 100000000000000
// 8bytes

var e uint8 = 11
// same as int but cannot be negative

var f byte = 250
//…


This content originally appeared on DEV Community and was authored by Vlad .

Today I’ve learned all of variables in Golang:

var a int8 = -11
//
1byte

var b int16 = 32000
2bytes

var c int32 = 1000000000
4bytes

var d int64 = 100000000000000
// 8bytes

var e uint8 = 11
// same as int but cannot be negative

var f byte = 250
// same as uint8

var g rune = -2567876
// same as
int32

var k int = 765
// int32 or int64

var l uint = 765
// uint32 or uint64

var m float32 = 3.987
// 4 bytes

var n float64 = 3. 98779786879
// 8 bytes

var isOne = true

var onWay = false

var name = "i "

fh := "assign everything"

const eu float64 = 15.9777575 // cannot change it


This content originally appeared on DEV Community and was authored by Vlad .


Print Share Comment Cite Upload Translate Updates
APA

Vlad . | Sciencx (2024-06-23T13:33:25+00:00) Variables. Retrieved from https://www.scien.cx/2024/06/23/variables-3/

MLA
" » Variables." Vlad . | Sciencx - Sunday June 23, 2024, https://www.scien.cx/2024/06/23/variables-3/
HARVARD
Vlad . | Sciencx Sunday June 23, 2024 » Variables., viewed ,<https://www.scien.cx/2024/06/23/variables-3/>
VANCOUVER
Vlad . | Sciencx - » Variables. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/06/23/variables-3/
CHICAGO
" » Variables." Vlad . | Sciencx - Accessed . https://www.scien.cx/2024/06/23/variables-3/
IEEE
" » Variables." Vlad . | Sciencx [Online]. Available: https://www.scien.cx/2024/06/23/variables-3/. [Accessed: ]
rf:citation
» Variables | Vlad . | Sciencx | https://www.scien.cx/2024/06/23/variables-3/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.