PRB: Len and LenB May Differ on Size of User-Defined Types (147668)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
This article was previously published under Q147668 SYMPTOMS
When used with a user-defined type, the LenB function may return a
different value than the Len function on 32-bit Windows platforms. This
behavior occurs because the LenB function returns the in-memory size of a
type, while the Len function returns the amount of size that a UDT would
take if stored on disk. This occurs because Visual Basic 4.0 32-bit
represents strings internally in Unicode, but externally (on disk) as ANSI.
A string in the two-byte Unicode standard will occupy twice as much space
as its ANSI equivalent.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 10/30/2003 |
---|
Keywords: | kb32bitOnly kbprb kbProgramming KB147668 kbAudDeveloper |
---|
|