Wednesday, 9 March 2016

Julia: Get size of data type (or) variable


‘sizeof(X)’ function return the size of variable (or) type in bytes.
julia> a=123;b=123.45;c=true;

julia> sizeof(a)
8

julia> sizeof(b)
8

julia> sizeof(c)
1

julia> sizeof(Float64)
8

julia> sizeof(Float32)
4

julia> sizeof(Char)
4



Previous                                                 Next                                                 Home

No comments:

Post a Comment