Variable size/Set: Difference between revisions

m
Line 297:
 
for t in types
println("For type ", lpad(t,6), " size is $(sizeof(t)) 8-bit bytebytes, or ",
lpad(string(8*sizeof(t)), 2), " bits.")
end
Line 305:
println("\nFor the 24-bit user defined type MyInt24, size is ", sizeof(MyInt24), " bytes.")
</lang> {{output}} <pre>
For type Bool size is 1 8-bit bytebytes, or 8 bits.
For type Char size is 4 8-bit bytebytes, or 32 bits.
For type Int8 size is 1 8-bit bytebytes, or 8 bits.
For type UInt8 size is 1 8-bit bytebytes, or 8 bits.
For type Int16 size is 2 8-bit bytebytes, or 16 bits.
For type UInt16 size is 2 8-bit bytebytes, or 16 bits.
For type Int32 size is 4 8-bit bytebytes, or 32 bits.
For type UInt32 size is 4 8-bit bytebytes, or 32 bits.
For type Int64 size is 8 8-bit bytebytes, or 64 bits.
For type UInt64 size is 8 8-bit bytebytes, or 64 bits.
 
For the 24-bit user defined type MyInt24, size is 3 bytes.
4,103

edits