Advanced PIC Microcontroller Projects in C: From USB to RTOS with the PIC18F Series

6.1: Program Description Language (PDL)

6.1 Program Description Language (PDL)

Program description language (PDL) is free-format English-like text which describes the flow of control in a program. PDL is not a programming language but rather is a tool which helps the programmer to think about the logic of the program before the program has been developed. Commonly used PDL keywords are described as follows.

6.1.1 START-END

Every PDL program description (or subprogram) should begin with a START keyword and terminate with an END keyword. The keywords in a PDL code should be highlighted in bold to make the code more clear. It is also a good practice to indent program statements between PDL keywords in order to enhance the readability of the code.

Example
<b class="bold">    START       .......       .......    END</b>

6.1.2 Sequencing

For normal sequencing in a program, write the statements as short English text as if you are describing the program.

Example
   Turn on the LED   Wait 1 second   Turn off the LED

6.1.3 IF-THEN-ELSE-ENDIF

Use IF, THEN, ELSE, and ENDIF keywords to describe the flow of control in a program.

Example
<span class="beginpage"> pagenum="289"><a name="746"></a><a name="page289"></a></span><b class="bold">    IF</b> switch = 1 <b class="bold">THEN</b>        Turn on LED 1    <b class="bold">ELSE</b>        Turn on LED 2    ...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Vacuum Furnaces
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.