Publication 1746-PM001A-US-P
6-6
Writing Programs Using the BASIC Development Language
Line Number
The Line Number directive allows you to specify a starting line number to be used
by the translator when it assigns line numbers to each program line. The line
number can be any number between the values of 1 and 65535.
Line Number directives can be placed anywhere in the program. The line following
the directive begins with the new number.
Syntax:
{$N [linenumber]}
Example:
Before translation:
After translation:
REM LINE NUMBERING
0 REM ...
{$N 500}
10 REM LINE NUMBERING
IF A>C THEN GOTO GET_C_VALUE
500 IF A>C THEN GOTO 800
A=55
510 A=55
{$L GET_C_VALUE}
800 C=107
{$N 800}
C=107
Increment
The Increment directive allows you to specify a numeric value to be used as an
increment between line numbers. The translator uses this increment when it
assigns line numbers during translation. The number must be between the values
of 1 and 100.
This directive can be used throughout the program as often as needed. The line
number immediately following this directive is numbered according to the previous
increment. Any lines after that are numbered according to the new increment.
Syntax:
{$S [number]}
Example:
Before translation:
After translation:
REM INCREMENT LINES BY 5’S
0 REM ...
{$S 5}
10 REM INCREMENT LINES BY 5’S
IF A>C THEN GOTO GET_C_VALUE
20 IF A>C THEN GOTO 35
A=55
25 A=55
REM INCREMENT LINES BY 10’S
30 REM INCREMENT LINES By 10’S
{$S 10}
35 C=107
{$L GET_C_VALUE}
45 END
C=107
END
Содержание 1747-PBASE
Страница 1: ...BASIC Development Software Catalog Numbers 1747 PBASE Programming Manual ...
Страница 8: ...Publication 1746 PM001A US P Table of Contents vi ...
Страница 34: ...Publication 1746 PM001A US P 2 14 Getting Familiar with Your Development Software ...
Страница 72: ...Publication 1746 PM001A US P 5 8 Manipulating Files ...
Страница 88: ...Publication 1746 PM001A US P 6 16 Writing Programs Using the BASIC Development Language ...
Страница 143: ......