BASIC IDEA: BRANCHING |
Without branching, programs would execute each command once, in order. Branching allows us to repeat sections of code, perform some sections conditionally, and skip others based on external events. |
|
|
Concept |
|
AMAX = dcount(ADDRESS,@VM) |
for APOS = 1 to AMAX |
gosub process.one.address.line |
next APOS |
* |
stop ;* Logical End of Program |
* |
* Start of Subroutines |
* |
process.one.address.line: |
begin case |
case CTRY = 'US' ; gosub validate.us.address |
case CTRY = 'CA' ; gosub validate.ca.address |
case CTRY = 'UK' ; gosub validate.uk.address |
case CTRY = 'AU' ; gosub validate.au.address |
end case |
* |
return |
|
Synonyms |
|
See also |
IF
| LOOP
| FOR
|
Categories |
ALL
| BRANCHING
|
More Details or Suggestions?
|
Updated from a Post-Relational data table on 10:18:30 23 Apr 2010
Courtesy of Key Ally, Inc.
More information at U2-Users Group
UniVerse is a Trademark of Rocket Software. Previous, IBM, Informix, Ardent, and vMark.
DMOZ
Wikipedia
|