Hi, in this video, we're going to be talking about the go data types. So go as mainly three types of data types, atomic, unsafe and abstract data types. So atomic data types are almost in every languages, string integers, 32 bit integers, 64 bit unsigned integers, unsigned 64, and 32 bit integers, then we've got unsafe, yes, golang supports pointers. So call by value and call by reference are still a thing in. And then we have abstract data types. So in this video, we're going to be talking about the atomic data types.
So to declare a variable, simply do that in one and then you can do m one is equal to two and simply print out this m one variable. To run this logic simply to go run main.go. And there you have it, to print. To declare multiple variables, what you can do is you can do this and one is equal to two and two is equal to three And you're going to notice that in this case, we don't need to define end or in 64, or in 32. That is because we used the equality sign. So it means that it's automatically implicit.
So, if we do this, if you do aware, and one in 32, and we do a wire into int 64, let's see what happens. Arrow, obviously, because we can't add items of two different data types. So what we can do in this case is we can type costed, so by type costing, by type costing, we can convert one data type into another data type. So how we might do that is like this. So simply do int 64 of m one. So we converted our 32 bit and 32 bit integer m one into 64 bit integer and now we got the answer.
And the answer was zero because by default, all of the variables in golang are initialized as 01. More interesting thing about it is, rather than declaring variables, you can also initialize variables in just one line. So you declare variables like this. But for initializing variables, you simply need to do m one is equal to two and two is equal to three. And we can simply remove this in 64 line. And let's see if it works or not.
Yes, it will. So this was our video on integers. And we also have untie unsigned integer types, which are very useful if you want counters and all of that. In the next video, we'll be talking about strings