EasyManuals Logo

Texas Instruments TI-Nspire Software Guide

Texas Instruments TI-Nspire
380 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #341 background imageLoading...
Page #341 background image
Programming 329
Embed the values directly in the object itself.
Use parameters in the definition. This lets users pass one or more
values as arguments to the object when they use it.
Example of passing values to a program
The following program, volcyl, calculates the volume of a cylinder. Two
values must be passed to the program. The first value must be the height,
and the second value must be the radius.
When you define the program in the Program Editor, you specify in
parentheses the parameters that will be used to store the passed values.
The parameters are placeholders, so their order is important. The names
you choose should be names that remind you which information to
supply.
1. Define the
volcyl program.
Define calculatearea()=
Prgm
area:=wt*ht
EndPrgm
Define calculatearea()=
Prgm
wt:=3
ht:=23
area:=wt*ht
EndPrgm
Define calculatearea(wt,ht)=
Prgm
area:=wt*ht
EndPrgm
Define volcyl(height,radius) =
Prgm
Disp “Volume =”, approx(
p ¦ radius
2
¦
height)
EndPrgm

Table of Contents

Other manuals for Texas Instruments TI-Nspire

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-Nspire and is the answer not in the manual?

Texas Instruments TI-Nspire Specifications

General IconGeneral
TypeDisplay
Form factorPocket
Product colorBlue, White
Display resolution320 x 240 pixels
Display size (HxV) (imperial)0 \
Compatible operating systemsWindows Vista/XP Mac OS X 10.4/10.5
Battery typeAAA
Number of batteries supported4
Weight and Dimensions IconWeight and Dimensions
Dimensions (WxDxH)100 x 198.3 x 28.7 mm

Related product manuals