Indenting A Program - HP 9000 200 Series Manual

Using the basic 5.0/5.1 system
Table of Contents

Advertisement

Renumbering a Program
After an editing session with many deletes and inserts, the appearance of your program
can be improved by renumbering. This also helps make room for long inserts. Renumber
programs with the REN command.
This example renumbers the entire program in memory, using a new beginning number
of 10 and incremental line numbers of 10:
REN
Both the starting line number and the interval between lines can be specified. For
example, the following example renumbers the entire program, using 100 for the first line
number and an increment of 5.
REN 100,5
If the increment (second parameter) is not specified, 10 is assumed. For example, the
command below renumbers the entire program, using 1000 for the first line number and
an increment of 10.
REN 1000
As shown in the first example above, a value of 10 is assumed for starting-line number
and line-number increment when no parameters are specified.
You can also renumber only a specified portion of a program. For example, the following
command renumbers only line numbers in the range 1000 to 2000:
REN
1000,10 IN 1000,2000
Indenting a Program
INDENT is also a non-programmable command. It is used to scan an entire program
and indent it so as to show the "nesting" of program segments! that define:
• Looping (such as FOR .. NEXT and REPEAT .. UNTIL)
• Conditional execution (such as IF .. THEN and SELECT .. CASE .. END CASE)
• A separate program segment (such as SUB subprograms and DEF FN user-defined
functions)
1
A complete list of the statements that define these constructs is provided in the BASIC Language
Reference description of the INDENT command.
Editing and Storing Programs
6-19

Advertisement

Table of Contents
loading

This manual is also suitable for:

9000 300 series

Table of Contents