EasyManuals Logo
Home>IBM>Laptop>5100

IBM 5100 Apl Reference Manual

IBM 5100
228 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 #87 background imageLoading...
Page #87 background image
The
4>
Function: Grade Up
OJ
OJ
The
~symbol
is
formed by overstriking
the
11
symbol and
the
I symbol.
Monadic (One-Argument) Form: Grade Up
~B
The
grade up function result
is
the
index values
that
would select
the
elements
of
argument B in ascending order.
That
is,
the
first element
of
the
result
is
the
index
of
the
smallest
element
in
argument
B,
the
next
element
is
the
index
of
the
next
smallest element in argument
B,
and so on. Argument B must be a numeric vector.
When
two
or more elements
in
the
vector have
the
same numeric value,
their
posi-
tion
in
the
yector determines
their
order
in
the
result (the index value
of
the
first
occurrence appears first in
the
output).
The
number
of
elements
in
the
result
is
the
same as
the
number
of
elements
in
the
argument:
.$3
1-
I!!'
...
1 2
I.f.
"~)
'+
1
C'
3
.....
.J
4tAt-6
2
~5
:I.
1+
:~
4-
2
6
-5
3
1
ib:3
6
:~
:I.
~5
::!
L~
6
:I.
3
5
r>
.:-
The
following example shows
how
the
grade up function can be used
to
sort
a vec-
tor
into ascending order:
At-:l.~
12
16
18
15
1:1.
A
[¢.AJ
11
12
1~
15
16
:1.8
The result
of
the
grade up function
is
not
the
reverse
of
the
grade down function
because
of
the
way equal elements are handled; see
The
'W
Function: Grade Down
for an example
uSing
the
grade up and grade down functions with equal elements.
Note:
The
result
of
the
~
function depends
on
the
010 system variable (see
Chap~
ter
5
for
information
on
the
010 system variable).
Dyadic (Two-Argument) Form
There
is
no
dyadic
form.
83

Table of Contents

Other manuals for IBM 5100

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM 5100 and is the answer not in the manual?

IBM 5100 Specifications

General IconGeneral
BrandIBM
Model5100
CategoryLaptop
LanguageEnglish

Related product manuals