Overview of entering a program, Entering and editing program lines, Entering multi-command lines – Texas Instruments PLUS TI-89 User Manual

Page 299: Entering comments

Advertising
background image

282 Chapter 17: Programming

17PROGRM.DOC TI-89/TI-92 Plus: Programming (English) Susan Gullord Revised: 02/23/01 1:14 PM Printed: 02/23/01 2:18 PM Page 282 of 40

On a blank template, you can begin entering commands for your new
program.

You enter and edit program commands in the Program Editor by
using the same techniques used to enter and edit text in the Text
Editor. Refer to “Entering and Editing Text” in Chapter 18.

After typing each program line, press ¸. This inserts a new blank
line and lets you continue entering another line. A program line can
be longer than one line on the screen; if so, it will wrap to the next
screen line automatically.

To enter more than one command on the same line, separate them
with a colon by pressing 2 Ë.

A comment symbol (

¦

) lets you enter a remark in a program. When

you run the program, all characters to the right of

¦

are ignored.

:prog1()
:Prgm
:¦ Displays sum of 1 thru n
:Request "Enter an integer",n
:expr(n)! n:¦ Convert to numeric expression
:------

To enter the comment symbol, press:

¦

TI

.

89:

¥ d

TI

.

92 Plus:

2

X

— or —

¦

Press „ and select

9:

¦

Overview of Entering a Program

A program is a series of commands executed in sequential
order (although some commands alter the program flow). In
general, anything that can be executed from the Home screen
can be included in a program. Program execution continues
until it reaches the end of the program or a Stop command.

Entering and Editing
Program Lines

Note: Use the cursor pad to
scroll through the program
for entering or editing
commands. Use

¥

C

or

¥

D

to go to the top or

bottom of a program,
respectively.

Note: Entering a command
does not execute that
command. It is not executed
until you run the program.

Entering Multi-
Command Lines

Entering Comments

Tip: Use comments to enter
information that is useful to
someone reading the
program code.

Program name, which you
specify when you create a
new program.

Enter your program
commands between Prgm
and EndPrgm.

All program lines begin
with a colon.

Description of the
program.

Description of expr.

Advertising
This manual is related to the following products: