174 Appendix A: Functions and Instructions
Define
progName
(
arg1Name, arg2Name, ...
) = Prgm
block
EndPrgm
Creates
progName
as a program or subprogram,
but cannot return a result using
Return. Can
execute a block of multiple statements.
block
can be either a single statement or a series
of statements separated with the “:” character.
block
also can include expressions and
instructions (such as
If, Then, Else, and For)
without restrictions.
Note: It is usually easier to author and edit a
program block in the Program Editor rather than
on the entry line.
Define listinpt()=prgm:Local
n,i,str1,num:InputStr "Enter
name of list",str1:Input
"No. of elements",n:For
i,1,n,1:Input "element
"&string(i),num:
num! #str1[i]:EndFor:EndPrgm
¸
Done
listinpt()
¸Enter name of list
DelFold CATALOG
DelFold
folderName1
[,
folderName2
] [,
folderName3
] ...
Deletes user-defined folders with the names
folderName1
,
folderName2,
etc. An error message is
displayed if the folders contain any variables.
Note: You cannot delete the
main folder.
NewFold games ¸ Done
(creates the folder games)
DelFold games ¸ Done
(deletes the folder games)
DelVar CATALOG
DelVar
var1
[,
var2
] [,
var3
] ...
Deletes the specified variables from memory.
2! a ¸ 2
(a+2)^2
¸ 16
DelVar a
¸ Done
(a+2)^2
¸ (a + 2)ñ
deSolve() MATH/Calculus menu
deSolve(
1stOr2ndOrderOde
,
independentVar
,
dependentVar
) ⇒
a general solution
Returns an equation that explicitly or implicitly
specifies a general solution to the 1st- or 2nd-
order ordinary differential equation (ODE). In the
ODE:
• Use a prime symbol ( '
, press 2 È) to
denote the 1st derivative of the dependent
variable with respect to the independent
variable.
• Use two prime symbols to denote the
corresponding second derivative.
The ' symbol is used for derivatives within
deSolve() only. In other cases, use
d
().
The general solution of a 1st-order equation
contains an arbitrary constant of the form @
k
,
where
k
is an integer suffix from 1 through 255.
The suffix resets to 1 when you use
ClrHome or
ƒ
8: Clear Home. The solution of a 2nd-order
equation contains two such constants.
Note: To type a prime symbol (
' ), press
2
È.
deSolve(y''+2y'+y=x^2,x,y)¸
y=(@1øx+@2)ø
e
ë x
+xñì4øx+6
right(ans(1))! temp ¸
(@1øx+@2)ø
e
ë x
+xñì4øx+6
d
(temp,x,2)+2ù
d
(temp,x)+tempìx^2
¸ 0
DelVar temp ¸ Done