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
Содержание 39gII
Страница 1: ...HP 39gII graphing calculator user s guide Edition1 Part Number NW249 90001 ...
Страница 2: ...Printing History Edition 1 November 201 1 ...
Страница 32: ...22 Getting started ...
Страница 58: ...48 Apps and their views ...
Страница 70: ...60 Function app ...
Страница 80: ...70 Solve app ...
Страница 132: ...122 Parametric app your own table and the split screen functionality available in the Function app ...
Страница 136: ...126 Polar app ...
Страница 140: ...130 Sequence app ...
Страница 148: ...138 Finance app ...
Страница 152: ...142 Linear Solver app ...
Страница 218: ...208 Matrices ...
Страница 226: ...216 Notes and Info ...
Страница 238: ...228 Variables and memory management ...
Страница 318: ...308 Programming ...
Страница 340: ...330 Reference information ...
Страница 346: ...vi Product Regulatory Information ...