Texas-instruments TI-73 EXPLORER User Manual Page 236

  • Download
  • Add to my manuals
  • Print
  • Page
    / 364
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 235
230
Chapter 12: Programming
7312ENG.DOC CH 12 Programming, English Julie Hewlett Revised: 07/29/98 12:17 PM Printed: 05/19/99 9:02
AM Page 230 of 32
Write a program named
TEST
that tests the values of variable
X. If X<10, manipulate X and Y and then display both values. If
X10, then display X and Y (without manipulating them).
PROGRAM:TEST
:1
"
X:10
"
Y
:If X<10
:Then
:2X+3
"
X
:2Y-3
"
Y
:End
:Disp {X,Y}
:Pause
If-Then-Else If-Then-Else 8
1, 2, and 3 1, 2, and 3
Use
If
with
Then
and
Else
to execute only one of two blocks of
commands depending upon condition. If condition is true
(non-zero), then block1 is executed. If condition is false
(zero), then block2 is executed.
End
identifies the end of
block2.
Then
,
Else
, and
End
each must be on a line by itself.
:
If
condition
:
Then
:block1 (if true)
:
Else
:block2 (if false)
:
End
:command
³
Page view 235
1 2 ... 231 232 233 234 235 236 237 238 239 240 241 ... 363 364

Comments to this Manuals

No comments