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 #88 background imageLoading...
Page #88 background image
84
The
'I'
Function:
Grade
Down
(]]
CIJ
The
1 symbol
is
formed
by overstriking
the
Vsymbol and
the
I symbol.
Monadic (One-Argument) Form: Grade Down 1
The
grade down
function
result
Js
the
index values
that
would
select
the
elements
of
the
numeric vector
of
argument
8
in
descending order.
That
is,
the
first
element
of
the
result
is
the
index
of
the
largest
element
in
argument
8,
the
next
element
is
the
index
of
the
next
largest
element
in
argument
8,
and
so on. Argument 8
must
be
a numeric vector. When
two
or
more elements
in
the
vector have
the
same
numeric value,
their
position in
the
vector 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:
~:'5
:I.
~:)
I')
,.-..
1+
3
~)
1
Lf.
11
"M
\f1Af'6
"
5
:l
1+
:3
......
:1.
:5
5
6 2
~:3
6
:3
1-
1::'
,J
2
2
5
:1.
~5
6
LI·
The
following example shows
how
the
grade
down
function
can be used
to
sort
a
vector in descending order:
A~14
12 16
18
15
11
f~d::
~A:I
18
16
15
1Lf.
12
11
The following example shows
how
equal elements are handled when using
the
grade
up
and
grade
down
functions:
A~M!:;
")
A.. 8
7
:5
If
10
1
2
:5
A
c'
...
1
r)
A
••
B
7 3
LI·
:1.0
:I.
2
:3-
Positions 2
and
9 and 5
and
10
are equal.
,A
7
3
1+
1 6
8
B
6 1
1+
:~
7

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