|
-
Nov 4th, 2000, 05:09 PM
#1
Thread Starter
transcendental analytic
.. LenB return the in-Memory Size of a User Defined Type when you have a dynamic array inside it?
from MSDN:
LenB Function Returns in-Memory Size of User-Defined Type
And it says nothing about dynamic arrays in it. I tested resizing a Integer array inside the UDT and it returned 4 whatever size it was.
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.
-
Nov 4th, 2000, 05:17 PM
#2
Monday Morning Lunatic
Perhaps VB stores the dynamic array as a pointer, so it doesn't take the other memory?
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Nov 4th, 2000, 05:18 PM
#3
Frenzied Member
A dynamic array is stored as a pointer to the data in it. Pointers are 4 bytes.
-
Nov 4th, 2000, 05:57 PM
#4
Thread Starter
transcendental analytic
Then i got a problem, how do i get the size of the Data?
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.
-
Nov 4th, 2000, 09:08 PM
#5
Frenzied Member
Do some arithmetic.
Looks to me as though you need to use Ubound & Lbound functions. Then do some arithmetic. Consult documentation on how much storage required for each item in array.
By the way, it often pays to use fixed length strings in arrays, avoiding the 10-Byte overhead per string for variable length strings.
Live long & prosper.
The Dinosaur from prehistoric era prior to computers.
Eschew obfuscation!
If a billion people believe a foolish idea, it is still a foolish idea!
VB.net 2010 Express
64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.
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
|