09.12.2012 Views

HP 8590 E & L Series Spectrum Analyzers and HP 8591C Cable TV ...

HP 8590 E & L Series Spectrum Analyzers and HP 8591C Cable TV ...

HP 8590 E & L Series Spectrum Analyzers and HP 8591C Cable TV ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

DLP Programming Guidelines<br />

This section contains some suggestions that can make it easier to write a DLP, read <strong>and</strong><br />

underst<strong>and</strong> the DLP code, <strong>and</strong> find problems in a DLP.<br />

lb Make the DLP More Readable<br />

Here are a few suggestions which help make any program, including a DLP, more readable:<br />

� Write short program lines. One or two comm<strong>and</strong>s per line.<br />

� Use st<strong>and</strong>ard indent format for looping <strong>and</strong> branching.<br />

� Use descriptive variable names <strong>and</strong> labels. ,<br />

� Add comments to the source code.<br />

� Make the program modular.<br />

lb Find Problems in a DLP<br />

More often than not, new programs do not work as they were intended to work. In DLPs,<br />

problems (also referred to as bugs) may appear in any of the following ways:<br />

� As an error message displayed on the analyzer screen.<br />

� The DLP does the unexpected. For example, it halts execution, or enters an infinite loop, or<br />

starts executing before its start-execution comm<strong>and</strong> occurs.<br />

� As an unexpected or out-of-range result or value is obtained.<br />

Some suggestions for find a problem in a DLP are as follows:<br />

� Follow the suggestions in “To make the DLP more readable. ”<br />

� Check that each function has matching delimiters, be careful with nested delimiters.<br />

� Check that the comm<strong>and</strong>s within the DLP are spelled correctly, contain spaces where<br />

indicated by the syntax diagram for the comm<strong>and</strong>, <strong>and</strong> are terminated by a semicolon.<br />

� You can use the DLP editor to inspect the contents of the DLP before you execute it. The<br />

DLP editor shows what characters the spectrum analyzer will use when executing the DLP.<br />

This can be helpful for finding omitted spaces.<br />

� Test FUNCDEFs individually. Comment out the calls to the other FUNCDEFs in the main<br />

FUNCDEF, if necessary.<br />

4-20 Creating <strong>and</strong> Using Downloadable Programs

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!