|
-
Jan 30th, 2001, 01:07 AM
#1
Thread Starter
New Member
how much memory does a variant use?
and how much memory does a boolean use?
-
Jan 30th, 2001, 02:20 AM
#2
transcendental analytic
Variant: 16 bytes for any datatype except strings, which need 22 bytes + stringlength * 2
Boolean: 2 bytes
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jan 30th, 2001, 01:17 PM
#3
Fanatic Member
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...
-
Jan 30th, 2001, 01:21 PM
#4
transcendental analytic
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..
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jan 30th, 2001, 01:50 PM
#5
Fanatic Member
So, for using one byte, do I need to declare String * 1 as data type?
-
Jan 30th, 2001, 01:58 PM
#6
transcendental analytic
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
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|