Structured English
From Wikipedia, the free encyclopedia
| This article may require cleanup to meet Wikipedia's quality standards. Please improve this article if you can. (July 2007) |
Contents |
[edit] Overview
Structured English is the marriage of English language with the syntax of structured programming. Thus structured English aims at getting the benefits of both the programming logic and natural language. Program logic helps to attain precision while natural language helps in getting the convenience of spoken languages.
[edit] Elements
Structured English consists of the following elements:
- Operation statements written as English phrases executed from the top down
- Conditional blocks indicated by keywords such as IF, THEN, and ELSE
- Repetition blocks indicated by keywords such as DO, WHILE, and UNTIL
Use the following guidelines when writing Structured English:
- Statements should be clear and unambiguous
- Use one line per logical element
- All logic should be expressed in operational, conditional, and repetition blocks
- Logical blocks should be indented to show relationship
- Keywords should be capitalized
[edit] Examples of keywords that may be used
IF, THEN, ELSE, ENDIF, DO, WHILE, REPEAT, UNTIL, ENDWHILE, CASE, EXIT, AND, OR, XOR, EQUAL, NOT, GE, GT, LE, LT
[edit] Example of Structured English
A bank will grant loan under the following conditions
- If a customer has an account with the bank and had no loan outstanding, loan will be granted.
- If a customer has an account with the bank but some amount is outstanding from previous loans then loan will be granted if special approval is needed.
- Reject all loan applications in all other cases.
IF customer has a Bank Account THEN
IF Customer has no dues from previous account THEN
Allow loan facility
ELSE
IF Management Approval is obtained THEN
Allow loan facility
ELSE
Reject
ENDIF
ENDIF
ELSE
Reject
ENDIF
[edit] Other Specification Tools
System processes at a lower level involve lot of computations and require more precision and clarity. This can be achieved with tools like:
- Decision Tree,
- Decision tables, and
- Structured English.

