Programming
273
String
commands
A string is a sequence of characters enclosed in double
quotes (""). To put a double quote in a string, use two
consecutive double quotes. The \ character starts an
"escape" sequence, and the character(s) immediately
following are interpreted specially. \
n
inserts a new line,
two backslashes insert a single backslash.
Example:
(
"Hello\nWorld!"
) displays
Hello
World!
on the terminal.
+
Syntax:
str1
+
str2 or str1
+
expression
Adds two strings together.
Example 1:
"QUICK"
+
"DRAW"
returns "QUICKDRAW"
Example 2:
32
X;"X
=
"
+
X
returns "X = 32"
asc
Syntax:
asc
(
str
)
Returns a vector containing the ASCII codes of string
str
.
Example:
asc
(
"AB"
) returns [65,66]
char
Syntax:
char
(
vector or int
)
Returns the string corresponding to the character codes in
vector
, or the single code
int
.
Examples:
char
(
65
) returns "A";
char
([82,77,72])
returns "RMH"
dim
Syntax:
dim
(
str
)
Returns the number of characters in string
str
.
Example:
dim
(
"12345"
) is 5,
dim
(
""""
) and
dim
(
"\n"
)
are both 1 (notice the use of the two double quotes and
the escape sequence).
expr
Syntax:
expr
(
str
)
Parses the string
str
into a number or expression.
Examples:
expr
(
"2+3"
) returns 5. If the variable
X
has
the value 90, then expr(
"X+10"
) returns 100. In a
Summary of Contents for 39gII
Page 1: ...HP 39gII graphing calculator user s guide Edition1 Part Number NW249 90001 ...
Page 2: ...Printing History Edition 1 November 201 1 ...
Page 32: ...22 Getting started ...
Page 58: ...48 Apps and their views ...
Page 70: ...60 Function app ...
Page 80: ...70 Solve app ...
Page 136: ...126 Polar app ...
Page 140: ...130 Sequence app ...
Page 148: ...138 Finance app ...
Page 152: ...142 Linear Solver app ...
Page 218: ...208 Matrices ...
Page 226: ...216 Notes and Info ...
Page 238: ...228 Variables and memory management ...
Page 318: ...308 Programming ...
Page 340: ...330 Reference information ...
Page 346: ...vi Product Regulatory Information ...