MMET 383 HSEIH EXAM 2, ERROR HANDLING TO PG.
59
Number, source, description - Answer -properties of the VB Err Object
On Error GoTo Variable
'code code code stuff for no errors
Exit Sub
Variable:
Msgbox("error")
Exit Sub
End Sub - Answer -Visual Code for Error Handling
Exit sub - Answer -statement that causes the program execution to exit out of the
current procedure; for when errors are found in a processing module; also use when an
immediate exit from the current procedure is the best solution
number=rnd()*(high-low)+low - Answer -random number function
* - Answer -three loops available in VB
counter-controlled - Answer -a loop is __ if a variable is incremented or decremented
during each loop cycle
loop variable or loop counter - Answer -variable for counter-controlled loops
initialize - Answer -you must __ the loop variable prior to the first loop iteration if the
loop is counter-controlled, and add code so the loop variable is properly
incremented/decremented during each loop cycle
pre-test - Answer -test condition before body execution
post-test - Answer -test condition after each execution; execute at least one time
"loop" - Answer -end loops with the command...
while - Answer -repetition continues as long as the condition is true
until - Answer -repetition continues as long as the condition is false
EXIT DO - Answer -when a loop is entered, the body statements are fully executed
before the condition is tested again unless you have __ to prematurely exit loop. If there
is neither a while or until, the loop is infinite unless __ is executed
, 'Initialize Sum, Num, then loop
Sum=0
Num=First
Do
Sum=Sum+Num
Num=Num+2
Loop While Num <= Last - Answer -post test while loop example
counting loops - Answer -use when # iterations are known
For Var = StartValue to EndValue [Step number]
'code code code stuff here
Next Var
'after statement - Answer -Logic for counting loops
'Initialize
Sum=0
For Num=First To Last Step 2
Sum=Sum+Num*Num
Next Num
'display
End Sub - Answer -Sum Squares Program with Counting For Loop
If/ElseIf/Else/Then etc - Answer -*
functions, procedures, and methods - Answer -what is the difference?*
how to call?
procedure - Answer -any sequence of statements that has a name and is executed in a
unit
function - Answer -
List1.Items.Add("Fish")
List1.Text; List1.ListIndex - Answer -List Box Commands
Picture1.Load("picture1.jpg")
IN DEBUG FOLDER - Answer -Picture Box Commands
Me.Closed
Me.Hide
Form1.show - Answer -Multi-Form Commands
navigate through pictures - Answer -
59
Number, source, description - Answer -properties of the VB Err Object
On Error GoTo Variable
'code code code stuff for no errors
Exit Sub
Variable:
Msgbox("error")
Exit Sub
End Sub - Answer -Visual Code for Error Handling
Exit sub - Answer -statement that causes the program execution to exit out of the
current procedure; for when errors are found in a processing module; also use when an
immediate exit from the current procedure is the best solution
number=rnd()*(high-low)+low - Answer -random number function
* - Answer -three loops available in VB
counter-controlled - Answer -a loop is __ if a variable is incremented or decremented
during each loop cycle
loop variable or loop counter - Answer -variable for counter-controlled loops
initialize - Answer -you must __ the loop variable prior to the first loop iteration if the
loop is counter-controlled, and add code so the loop variable is properly
incremented/decremented during each loop cycle
pre-test - Answer -test condition before body execution
post-test - Answer -test condition after each execution; execute at least one time
"loop" - Answer -end loops with the command...
while - Answer -repetition continues as long as the condition is true
until - Answer -repetition continues as long as the condition is false
EXIT DO - Answer -when a loop is entered, the body statements are fully executed
before the condition is tested again unless you have __ to prematurely exit loop. If there
is neither a while or until, the loop is infinite unless __ is executed
, 'Initialize Sum, Num, then loop
Sum=0
Num=First
Do
Sum=Sum+Num
Num=Num+2
Loop While Num <= Last - Answer -post test while loop example
counting loops - Answer -use when # iterations are known
For Var = StartValue to EndValue [Step number]
'code code code stuff here
Next Var
'after statement - Answer -Logic for counting loops
'Initialize
Sum=0
For Num=First To Last Step 2
Sum=Sum+Num*Num
Next Num
'display
End Sub - Answer -Sum Squares Program with Counting For Loop
If/ElseIf/Else/Then etc - Answer -*
functions, procedures, and methods - Answer -what is the difference?*
how to call?
procedure - Answer -any sequence of statements that has a name and is executed in a
unit
function - Answer -
List1.Items.Add("Fish")
List1.Text; List1.ListIndex - Answer -List Box Commands
Picture1.Load("picture1.jpg")
IN DEBUG FOLDER - Answer -Picture Box Commands
Me.Closed
Me.Hide
Form1.show - Answer -Multi-Form Commands
navigate through pictures - Answer -