| BASIC
Program Application Development Steps |
| Step 1 - Top Level Application Description |
|
Write a top level description of what your BASIC application needs to do in the simplest possible terms (text description, a statement list, a flow chart or whatever you are most comfortable with). Try to avoid implementation specific details at this point. If you can't describe your application, you can't program it. If your application is large and complex, break it down into small pieces. Almost all application programs have three components:Input, Process, Output. ·- What is your
application's input? Serial Port, Physical Input, PLC V-Memory,...
|
| Step 2 - Review Your Description |
|
Read
over your top level description. If the questions have caused parts of the application to change, repeat steps 1 and 2 until you are satisfied, otherwise proceed to step 3. |
| Step 3 - Low Level Application Description |
|
Refine your top level description with application specific
details using the simplest possible terms (text description, a statement
list, a flow chart or whatever you are most comfortable with).
|
| Step 4 - Code and Test Application Framework |
|
Every FACTS Extended BASIC program has several statements
that should be included. The program may work without these statements
but it is always good programming practice to include these statements,
plus they may save you debugging time down the road.
- STRING - If using any strings they should be explicitly allocated - DIM - If using dimensioned arrays this is required - SETPORT - If using a serial port, the port should be explicitly configured - SETINPUT- If using the INPUT statement the SETINPUT statement explicitly configures how it will work - Variable Initialization - It is always good programming practice to initialize variables - Debug Statements - Program PRINT statements to PRINT status of the program and important variables |
| Step 5 - Program Application Component |
|
Write code for the next application component. The simpler
the component, the better.
|
| Step 6 - Test Application Component |
|
Test all possible input and output combinations of the
application component.
|
| Step 7 - Repeat Steps 5 and 6 for Each Application Component |
|
|
| Step 8 - Test Full Application |
| Test every combination possible before putting the program into service. |