beautypg.com

Repeat, Return – Texas Instruments TI-86 User Manual

Page 357

background image

Chapter 20: A to Z Function and Instruction Reference

345

20ATOZ.DOC TI-86, Chap 20, US English Bob Fedorisko Revised: 02/13/01 2:42 PM Printed: 02/13/01 3:05 PM Page 345 of 118

20ATOZ.DOC TI-86, Chap 20, US English Bob Fedorisko Revised: 02/13/01 2:42 PM Printed: 02/13/01 3:05 PM Page 345 of 118

Repeat

‡ program editor

CTL menu
(Repea shows
on menu)

:Repeat

condition

:

commands-to-repeat

:End
:

commands

Executes commands-to-repeat until condition is true.

Program segment:

©

:6¶N
:1¶Fact
:Repeat N<1
: Fact¹N¶Fact
: N

N

1¶N

:End
:Disp "6!=",Fact

©

Return

‡ program editor

CTL menu
(Retur shows
on menu)

Return

In a subroutine, exits the subroutine and returns to the
calling program. In the main program, stops execution
and returns to the home screen.

Program segment in the calling program:

©

:Input "Diameter:",DIAM
:Input "Height:",HT
:AREACIRC
:VOL=AREA¹HT
:Disp "Volume =",VOL

©

AREACIRC subroutine program:

PROGRAM:AREACIRC
:RADIUS=DIAM/2
:AREA=

p¹RADIUS

2

:Return

RK

† graph format screen

(scroll down to
second screen)

RK

In

DifEq

graphing mode, uses an algorithm based on the

Runge-Kutta method to solve differential equations.
Typically,

RK

is more accurate than

Euler

but takes

longer to find the solutions.