ABCDEFGHIJKLM
NOPQRSTUVWXYZ


A

Abs(expr ) : The absolute value function. Returns the absolute number of the numerical argument, expr.

And: A logical operator joining two well defined logical expressions into one compound logical expression. The compound expression formed will be TRUE only when both logical expressions on each side are TRUE. Logical operator precedence: Not, And, Or.

Asc(str): The ascii function returns the ascii code of the first character of str.

Assignment Statement: A statement which assigns values to variables. Form: Let var = expr, where expression can be a constant, a variable, or an expression containing any combinations of values, constants, operators, and functions.


B

Boolean: A Visual Basic type which is either TRUE or FALSE.

ByRef: A specificiation used in declaring the parameter list of function and subroutine declarations which allows values to be passed back to their mapped arguments in the calling function or subroutine. Visual Basic defaults all parameters as ByRef unless declared ByVal.

ByVal: A specification used in declaring the parameter list of functions and subroutine declarations which prevents values to be passed back to their mapped arguments in the calling function or subroutine. If not used, Visual Basic defaults parameters as ByRef.


C

Case Structure: An alternate structure to IF structures that can be used when there are a limited number of values and associated blocks to execute. This structure is ideal for menu driven programs.

Chr( expr ): The character function takes an integer argument and returns the ascii character associated with that integer.

Close #n: This statement closes file number n, which was Opened as file number n. without the #n, this statement will close all opened files.

Cls: The Clear Screen routine is a method associated with the PictureWindow Object. Form: Picture1.Cls

Cos( expr) : The Cosine function takes an argument of type double and returns a type double. The argument is assumed to be in radian angle measure (180 degrees = pi radians).

CurrentX : The public member variable representing the current horizontal position where the next pixel will be drawn in a picture window. This value can be retrieved or set depending on its use. (eg. Let picture1.CurrentX = picture1.CurrentX + 1 will increase the position by one. The value is dependent upon the Scale set.

CurrentY: The public member variable representing the current vertical position where the next pixel will be drawn in a picture window. This value can be retrieved or set depending on its use. (eg. Let picture1.CurrentX = picture1.CurrentX + 1 will increase the position by one. The value is dependent upon the Scale set.


D

Dim: Used to declare variables of a specified type. Form: Dim var1 as type, var2 as type, var3 as type. Variables must be declared if Option Explicit has been set. It is good practice to set this option.

Do: The beginning statement the following conditional loops: Do While cond .... Loop, Do Until cond .... Loop, Do ... While cond, Do ... Until cond. In this course, most conditional loops use the form: While cond... Wend

Double: A numeric type which accommodates positive and negative values whose magnitude is in the interval [4.94065 x 10^(-324) , 1.797693134862316 x 10^(308) and capable of storing a maximum of 17 significant digits.


E

Else: Part of the conditional structure If cond Then ... Else ... End IF

End: This statement will terminate the program upon its execution.

End If: The closing statement required in any conditional If structure.

EOF( n): A boolean function which returns True if an opened file has read past it's last data value and is at the end of file marker, else it returns False.

Exit: Used in conjunction with loop, function and subroutine identifiers will cause execution to prematurely leave that operation. Forms: Exit For, Exit Sub, Exit Function. Execution will move to the next executable line after the For Loop, subroutine call, or function call.

Exp(expr): The exponential function e^x where e is a constant which is approximately 2.718282.


F

False: In Visual Basic, this boolean value is zero.

For Next Loop: A For Loop has the following form: For var = start_value To stop_value [Step increment_value] ... Next var. If the Step is ommitted, the increment value defaults to 1.

Format$(expr, cntrl_strng): This function returns a string value containing a formatted conversion of the value expr. Cntrl_string determines what format will be used. Some control strings are: "Currency" which affixes the dollar sign and rounds to the nearest cent, "Standard" which inserts commas every three digits and rounds to two decimal places.


G

Get #n, r, recVar: A command to retreive data from the rth record of a random access file into a defined record variable structure.


H


I

If: The beginning word in one of several conditional structures including If cond Then .. End If, If cond Then .... Else.... End If, If cond1 Then ... ElseIF cond2 Then ... ElseIF cond n Then ... Else ... End If

Input #n, var_list: A statement which will retrieve data from the file opened as #n into the list of specified variables.

InputBox(prompt, title, default_string, xpos, ypos): A function which, when executed, displays a box with a prompt (string), a box title (string), a default value (string), and the x and y positions of the upper left hand corner of the box (integers). In most instances, the use will be simply InputBox("string constant").

Instr( str1, str2): The instring function returns either the starting position of the substring, str2, within str1, or zero if that substring does not exist. The form Instr(n, str1, str2) returns the nth occurences of the substring, str2, within str1 or zero if that substring does not exist.

Int( expr): The integer function returns the integer which is less than or equal to the value of the numeric expression.

Integer: The Integer type can hold the set of integers within the set [-32767, 32768]. The integer uses 2 bytes (16 bits) of memory and is capable of storing 2^16 different values. 2^15 = 32768.


J


K

Kill "filespec": This statement will delete a file specified by filespec, which contains the volume, path and complete file name.


L

LCase( str): The lower case function returns a string which converts any upper case characters in str to lower case characters.

Left(str, n): The left string substring function returns the n leftmost characters of str.

Len(str): The length function returns an integer representing the number of characters contained in its string argument.

Len(var): This function returns the number of storage bytes used for its variable argument.

Let Statement: See Assignment Statement.

Line: This method is associated with a Visual Basic PictureWindow object and draws a line specified by two coordinate pairs using the following form: Picture1.Line (a,b) - (c,d)

Loc(n): This function returns the current record number that a random access file pointer is set to.

LOF(n): This function returns the number of characters which exist in a random access file. Used in conjunction with the Len(recvar) function, the number of records can be determined using the expression LOF(n)/Len(recvar). The record variable is required to be the same length as the one used to write the data to the file.

Log(expr): The Natural Logarithm function returns the natural log of the value expr.

Long: A variable type which uses 4 byes of memory and accommodates integers in the domain [-2,147,483,648 , 2,147,483,647]. One byte uses 8 bits of memory. 2^31 = 2,147,483,648


M

Member variables: Privately declared variables within a class defintion file (*.cls).

Mid(str, p): A substring function which returns the characters from the pth position to the end of the string, str. An alternate form is Mid(str, p, n) which returns the substring starting at position p and containing n characters.

Mod: The Mod operator returns the remainder whole number after the first operand is divided by the second operand. For example, 12 = 2 * 5 + 2. The expression 12 mod 5 would yield 2.


N

Next: The marker which denotes the end of a For Loop.

New: Used with Set or Dim to create a user-defined class object. Form Dim objectName as New ObjectClass, Set objectname = New ObjectClass.

Not( logical_expr) : The logical operator which reverses the value of the logical expression it operates on. Parentheses are strongly recommended as Not can affect variables directly. Not a > 0 would evaluate a as a logical value (a being zero would be False and a not being zero would be evaluated as True). Say a = 0. Thus, 0 is False, Not a would then be Not False, which is True. True has the numeric value -1, so the expression would become -1 > 0, which is False. However,using parentheses, we have Not (a > 0) yields Not (0 > 0) which yeilds Not( False), which yeilds True.Logical operator precedence: Not, And, Or.


O

Open: The open statement opens both sequential and random access files for input and output. Opening a sequential file: Open filespec For Input as #n. Opening a sequential file for output: Open filespec For Output as #n (warning: will delete any existing data!). For appending to an existing sequential file: Open filespec for Append as #n. For a random access file: Open filespec for Random as #n, Len = Len(recvar).

Option Explicit: forces programmer to declare all variables used with Dim statements. This statement appears before the action subroutines (eg. Sub Command1_Click() ) and can be automatically set in VB5.0 or higher by setting Editor options under the tool menu to "Require Varible declaration". Using Option Explicit is highly recommended as typing errors in using variables are difficult to detect without this option and easily detected when using it.

Or: This logical operator joins two well defined logical expressions to form a compound logical expression. The compound expression is True if at least one of the two logical expressions are True. Logical operator precedence: Not, And, Or.


P

Picture: A Picture object is a picture window which is used for displaying any output including graphics. The object is associated with numerous methods of the form Picture1.method. Picture objects are dragged from the Visual Basic toolbar onto the the form and are named Picturen where each picture window gets a consecutive counter number, {1,2,...}. Oftentimes, authors rename the Picture names by bringing up the properties and setting a new name in the name field.

Print #n, var_list: This statement is used to write values to a sequential file which has been opened either for output or for append. It differes from Write because it places values into the file in an identical manner to displaying values in a picture window. See Open.

Print : The print statement writes values to the PictureWindow associated with it as a method. Form: Picture1.Print list of values separated by either semi-colons (perferred) or commas (output to print fields).

Printer: The object Printer has several methods associated with it, such as print, NewPage (form feed), and EndDoc(terminate printing) and enables output to be sent to the default printer.

Private: An identifier used to declare member variables of classes, and functions and subroutines which restricts access to the module these entities are declared/defined in.

Property Get : This is a procedure which accesses a private class member variable through a implied parameter which behaves as a public variable in the main module. Alternately, defining a public class function with no parameters and which returns the value of the member variable is preferred.

Property Let : This is a procedure which allows private class member variables to be assigned in other modules (such as our main module, Sub Command1_Click() ) via an implied parameter which behaves as a public variable in the main module. Alternately, defining a public class subroutine with a single parameter is perferred.

PSet : The graphics method associated with Picture Window objects which draws a point at a specified coordinate. Form: Picture1.Pset(x,y)

Public: An identifier used to declare member variables of classes, and functions and subroutines which allows access to other modules outside the one these entities are declared/defined in.


Q

QBColor: This function causes such graphsics methods as Line and PSet to be drawn in one of sixteen different colors. The form is QBColor (n) where 0<= n <= 15.


R

Randomize: This subroutine causes the Random Function, Rnd, to generate a different sequence of pseudo-random numbers each time the program is run. It achieves this by accessing the computers clock to generate a different "seed" value for the Random function.

ReDim: This statement is used to dynamically declare array variables (one or multi-subscripted variables) during run-time. Although static variables can be declared using the Dim statement within general declaration area, since these variables are accessible across modules and are considered not to conform to good modular design principles, it is recommended that ReDim be exclusively used to declare arrays.

Rem: A Remark statement is used to document the program and its various components. Alternately, individual basic statements can have remarks attached behind them by preceeding the remark with an apostrophe.

Right: This substring function has the form: Right(str, n). It returns the substring containing n rightmost letters of str.

Rnd: This function returns a random value of type single in the half open interval [0, 1). Used in conjunction with the Int function, it can return a random integer in the range [a, b] by including it in the expression Int( Rnd * (b - a) ) + a + 1.


S

Scale: A method associated with a Picture Window object which specifies the coordinate scale of the picture window using the following Form: Picture1.Scale (a,b) - (c, d) where the horizontal scale will range from a on the left to c on the right and the vertical scale will be from d at the bottom to b at the top.

Seek #n, p: A Random Access file directive which moves the filepointer to the pth record of the Random Access File opened as #n.

Set: Set assigns member variable values from one object to another. Form: Set objectname1 = objectname2. This statement can be used in conjunction with the class operator New as Set objectname = New classname and the object member variables will then take on the values as specified in the initialize subroutine within the class definition module.

Sin( expr): The trigonometric Sine function takes a numeric argument which should be in radian angle measure (180 degrees = pi radians).

Single: The Type single uses 4 bytes of memory and can accommodate floating point values both positive and negative with a magnitude in the range [1.40129 x 10^(-45) , 3.40283 x 10^38] storing at most 7 significant digits.

Spc( n) : This string function returns a string of n spaces.

Str(expr): This string function returns a string representation of the numeric value of expr. This is very useful when you need to change the prompt of an InputBox( ) function within a For loop using Let value = InputBox("Enter value # " & Str(i) ). The ampersand represents the string concatenation operator, which joins the two strings together.

String: This Visual Basic Type holds up to a maxium of 32767 characters. String constants are enclosed in quotes. The form String * n in a Dim statement declares a fixed character string whose ascii values are zero (null character).

String(n, str): This function returns a string consisting of n sets of the characters in str. 0<= n <= 32767.

Sub: Sub subname (parameter list) is the first line of a declared subroutine. The multi-line structure's last line is End Sub.


T

Tab(p): This function is associated with the print statement and causes output to be placed in the pth column. If the output cursor has exceeded this specified position, then the output will be placed in the pth column on the next line down.

Tan(expr): This trigonmetric function returns the tangent of an expression in radians where expr does NOT equal multiples of pi/2.

True: A boolean constant which is represented by the integer value, -1.

Type/End Type: The beginning and end of a user-defined structure which is used to create record variables for random access file operations. Type definitions must be placed in a Visual Basic *.BAS module.

Typename(var): This function returns a string containing a description of the type a variable is. eg. "String", "Integer", "Boolean".


U

Ubound(arrayname): This function returns the upperbound of a declared array. Since arrays passed as parameters show no indication of the upperbound, this function proves very useful.

UCase(str): This function returns a string containing the characters in str where all the lower case letters have been converted to upper case.


V

Val(str): The Val( ) function returns the numeric value of the leading digits in str. If the digits are not in the leftmost postition of the str, Val() returns zero.

Variant: Variables declared as variant can be assigned a variety of values (eg. string, double)


W

While/Wend: A conditional loop structure with the following format: While condition ... Wend. The block of statments will continue to be executed as long as the while condition is True at the time execution executes the While statement.

With/ EndWith: This structure is used for record variables and for class objects to reduce the references to that record name or object. Form: With objectname ... With End. For class objects, methods and public variables can be accessed as .name

Write #n, var_list:This statement is used to write values to a sequential file which has been opened either for output or for append. See Open.


X

Xor: The exclusive Or logical operator joins two logical expressions to form a compound logical expression. The compound expression is true only when exactly one of the two logical expressions are True.


Y


Z