how much memory does a variant use?
and how much memory does a boolean use?
Printable View
how much memory does a variant use?
and how much memory does a boolean use?
Variant: 16 bytes for any datatype except strings, which need 22 bytes + stringlength * 2
Boolean: 2 bytes
Isn't a boolean only 1 byte? I mean, what's the difference between an integer (2 bytes) and a boolean, if it's also 2 bytes.
I know in VB3, the boolean data type did not exist, so I presume that this type only uses 1 byte.
I'm not sure. Please correct me if necessary...
A boolean consumes 2 bytes, i know it sounds stupid but that's what it does, it's like enumerations, they are integers to allow negative numbers and -1 is true for a boolean variable, dunno if that's the connection..
So, for using one byte, do I need to declare String * 1 as data type?
byte datatype eats one byte and represents a numeric value from 0 to 255, if thats what you need. String*1 would consume 2 bytes and is represented as a string