aboutsummaryrefslogtreecommitdiff
path: root/src/input/array1.input.pamphlet
blob: d0c494b13ac7dc11037e4d8e0096dcc2cd90e50d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/input ARRAY1.input}
\author{The Axiom Team}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
<<*>>=

-- Input generated from OneDimensionalArrayXmpPage
)clear all

oneDimensionalArray [i**2 for i in 1..10]
a : ARRAY1 INT := new(10,0)
for i in 1..10 repeat a.i := i; a
map!(i +-> i ** 2,a); a
reverse! a
swap!(a,4,5); a
sort! a
b := a(6..10)
copyInto!(a,b,1)
@
\eject
\begin{thebibliography}{99}
\bibitem{1} nothing
\end{thebibliography}
\end{document}