beautypg.com

Getkey, Getkey getkey 8 – Texas Instruments TI-73 EXPLORER User Manual

Page 252

background image

246

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 246 of 32

Write a program named

OUTPUT

that writes the contents of B

to a specific area on the screen.

PROGRAM:OUTPUT

:3+5"B

:ClrScreen

:Output(5,4,"ANSWER: ")

:Output(5,12,B)

:Pause

getKey

getKey 8

"

7

7

getKey

returns a number corresponding to the last key pressed,

according to the following key code diagram. If no key has

been pressed,

getKey

returns 0. Use

getKey

inside loops to

transfer control, for example, when creating programs that use

a key to control the logic flow.

:getKey

TI

N

73

Key Code Diagram

³

^

has no number associated with it.

It stops program execution.