Variables
Is Variant slower then other types?
Compatibility:VB3
VB4
VB5
Yes. VB must determine the type of the variable for every access.
What does it mean to pass by reference?
Compatibility:VB3
VB4
VB5
When you pass by reference, you get the actual variable. (You pass by reference by default.)
In contrast, when passing by value, you get a copy of the variable.
The net effect is passing by value prevents you from changing the variable
How should I format dates so that they look correct in all date and langauge formats?
Compatibility:VB3
VB4
VB5
Instead of defining your own format, like this:
myStr = format$(myDate, "mm:dd:yy")
use the predefined types, like this:
myStr = format$(myDate, "Short Date")
How can I get a pointer to a string, object,
or variable?
Compatibility:VB3
VB4
VB5
For strings, use the undocumented function StrPtr.
If you need a pointer to a object, use ObjPtr. Finally,
if you need a pointer to a variable use VarPtr.
Copyright 2000, David J Berube<Form1@aol.com>. All Rights Reserved.