no problem. As good practice (imho) you should define variables explicitly, and use some notaion, either one or three letters...
(one letter for DBP is fine)
strUserName As String -or-
sUserName As String
intPortNum As Integer -or-
iPortNum As Integer
fltPositionX As Float -or-
fPositionX As Float
dwoScore As DWord -or-
dScore As DWord
You get the idea. The notation ahead of the var name gives you an idea of what type the variable is, without having to find the def in code if you forget.
Any one of these can be preceeded with GLOBAL to expose it to functions, as we stated earlier.
Also another method for safe variable declaration, or a type of Option Explicit is to put all your variables inside a User Defined Type. Currently an undeclared variable in DBP is allowed to compile but is treated as zero or "" empty string. This is all well and good until you spell a variable name wrong somewhere in code and the bug drives you mad trying to find it. Heres a simple way of protecting yourself from that potential nightmare.
Type Vars
strUserName As String
intPortNum As Integer
fltPositionX As Float
dwoScore As DWord
EndType
v as Vars
Now to get at your variables you need to type "v.strUserName" or "v.dwoScore" (as an example). So now, if you mispell the var name inside the type the compiler will throw an exception, thus eliminating variable misspellings.
good luck
DBP_NETLIB_v1.4.3 - 65 FREE Functions * Click Logo