Programming
275
left
Syntax:
left
(
str,n
)
Return the first
n
characters of string
str
. If
or ,
returns
str
. If
n ==
0 returns the empty string.
Example:
left
(
"MOMOGUMBO",3
) returns "MOM"
right
Syntax: right(
str,n
)
Returns the last n characters of string
str
. If
n
<= 0, returns
empty string. If
n
>
- dim
(
str
), returns str
Example:
right
("MOMOGUMBO",5) returns
"GUMBO"
mid
Syntax:
mid
(
str,pos,
[
n
])
Extracts
n
characters from string
str
starting at index pos.
n
is optional, if not specified, extracts all the remainder of
the string.
Example:
mid
(
"MOMOGUMBO",3,5
) returns
"MOGUM",
mid
(
"PUDGE",4
) returns "GE"
rotate
Syntax:
rotate
(
str,n
)
Permutation of characters in string
str
. If 0<=
n
<
dim
(
str
),
shifts
n
places to left. If
-dim
(
str
)<
n
<=-1, shifts
n
spaces to
right. If
n
>
dim
(
str
) or
n
<
-dim
(
str
), returns
str
.
Examples:
rotate
(
"12345",2
) returns "34512"
rotate
(
"12345",-1
) returns "51234"
rotate
(
"12345",6
) returns "12345"
Test Commands
The Test commands include both Boolean and relational
operations. Boolean and relational expressions evaluate
to true or false. A non-zero number is equivalent to true,
and a number equal to 0 is equivalent to false. Note that
in addition to real numbers, complex numbers, strings,
lists, and matrices can be compared using the relational
operators ==, NOT (or !=), and (or <> or !=). These
commands are not in the CMDS menu. They appear in
the Math menu but are listed here for convenience.
n
dim str
(
)
≥
n
0
<
Содержание 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 ...