File: introExample25.tex

package info (click to toggle)
sollya 7.0%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 13,864 kB
  • sloc: ansic: 117,441; yacc: 8,822; lex: 2,419; makefile: 870; cpp: 76
file content (37 lines) | stat: -rw-r--r-- 760 bytes parent folder | download | duplicates (4)
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
32
33
34
35
36
37
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> autosimplify = off;
Automatic pure tree simplification has been deactivated.
> i = 1000;
> i = i + 1;
> print(i);
1000 + 1
> i := i + 1;
> print(i);
1002
> L = [|1,...,5|];
> print(L);
[|1, 2, 3, 4, 5|]
> L[3] = L[3] + 1;
> L[4] := L[4] + 1;
> print(L);
[|1, 2, 3, 4 + 1, 6|]
> L[5] = true;
> L;
[|1, 2, 3, 5, 6, true|]
> s = "Hello world";
> s;
Hello world
> s[1] = "a";
> s;
Hallo world
> s[2] = "foo";
Warning: the string to be assigned is not of length 1.
This command will have no effect.
> L = [|true,1,...,5,9...|];
> L;
[|true, 1, 2, 3, 4, 5, 9...|]
> L[13] = "Hello";
> L;
[|true, 1, 2, 3, 4, 5, 9, 10, 11, 12, 13, 14, 15, "Hello", 17...|]
\end{Verbatim}
\end{minipage}\end{center}