Agilent Technologies 8590 TV Converter Box User Manual


 
DLP Programming Guidelines
This section contains some suggestions that can make it easier to write a DLP, read and
understand the DLP code, and find problems in a DLP.
lb
Make the
DLP
More Readable
Here are a few suggestions which help make any program, including a DLP, more readable:
n
Write short program lines. One or two commands per line.
n Use standard indent format for looping and branching.
n
Use descriptive variable names and labels.
,
n
Add comments to
the
source code.
n
Make the program modular.
lb
Find Problems in a DLP
More often than not, new programs do not work as they were intended to work. In
DLPs,
problems (also referred to as bugs) may appear in any of the following ways:
n As an error message displayed on the analyzer screen.
n The DLP does the unexpected. For example, it halts execution, or enters an infinite loop, or
starts executing before its start-execution command occurs.
n As an unexpected or out-of-range result or value is obtained.
Some suggestions for find a problem in a DLP are as follows:
n
Follow the suggestions in “To make the DLP more readable.
n Check that each function has matching delimiters, be careful with nested delimiters.
n Check that the commands within the DLP are spelled correctly, contain spaces where
indicated by the syntax diagram for the command, and are terminated by a semicolon.
n You can use the DLP editor to inspect the contents of the DLP before you execute it. The
DLP editor shows what characters the spectrum analyzer will use when executing the DLP.
This can be helpful for finding omitted spaces.
n
Test FUNCDEFs individually. Comment out the calls to the other FUNCDEFs in the main
FUNCDEF, if necessary.
4-20 Creating and Using Downloadable Programs