While, With – Texas Instruments PLUS TI-89 User Manual

Page 535

Advertising
background image

518 Appendix A: Functions and Instructions

8992APPA.DOC TI-89 / TI-92 Plus: Appendix A (US English) Susan Gullord Revised: 02/23/01 1:48 PM Printed: 02/23/01 2:21 PM Page 518 of 132

Nest

when()

to define expressions that have

more than two pieces.

TI-89:

"

TI-92 Plus:

¥ "

ClrGraph ¸

Done

Graph when(x<0,when(x<ë

p,

4ù sin(x),2x+3),5ì x^2) ¸

when()

is helpful for defining recursive

functions.

when(n>0,nù factoral(nì 1),1)

! factoral(n) ¸

Done

factoral(3) ¸

6

3

!

¸

6

While

CATALOG

While

condition

block

EndWhile

Executes the statements in

block

as long as

condition

is true.

block

can be either a single statement or a

sequence of statements separated with the “:”
character.

Program segment:

©

:1! i

:0! temp

:While i<=20
: temp+1/i! temp

: i+1! i

:EndWhile
:Disp "sum of reciprocals up to

20",temp
©

“With”

See

|

, page 538.

xor

MATH/Test menu

Boolean expression1

xor

Boolean expression2

Boolean expression

Returns

true

if

Boolean expression1

is

true

and

Boolean expression2

is false, or vice versa.

Returns

false

if

Boolean expression1

and

Boolean expression2

are both true or both

false. Returns a simplified Boolean
expression if either of the original Boolean
expressions cannot be resolved to true or
false.

Note:

See

or

.

true xor true ¸

false

(5>3) xor (3>5) ¸

true

Advertising
This manual is related to the following products: