Control structure in programming language is command with form (structure) certain applied to arrange (controls) the way program. Visual of Basic 6 recognizes two control structure types, that is :
1. Decision control structure - applied to decide which program code would done based on a condition.
2. Repetition control structure - applied to do repetition of program code. Would studied at chapter hereinafter.
There is two form of decision control structure, that is :
1. Structure IF ... THEN.
2. Structure SELECT ... CASE.
Form of writing (syntax) structure IF ... THEN :
1. IF condition THEN program code
If condition valuable of True hence
2. IF condition THEN
program code block 1
ELSE
program code block 2
END IF
If condition valuable of True hence program code block 1 will be done, but if condition valuable of False hence program code block 2 which will be done.
Control structure in programming language is command with form (structure) certain applied to arrange (controls) the way program. Visual of Basic 6 recognizes two control structure types, that is :
1. Decision control structure - applied to decide which program code would done based on a condition.
2. Repetition control structure - applied to do repetition of program code. Would studied at chapter hereinafter.
There is two form of decision control structure, that is :
1. Structure IF ... THEN.
2. Structure SELECT ... CASE.
Form of writing (syntax) structure IF ... THEN :
1. IF condition THEN program code
If condition valuable of True hence
2. IF condition THEN
program code block 1
ELSE
program code block 2
END IF
If condition valuable of True hence program code block 1 will be done, but if condition valuable of False hence program code block 2 which will be done.