File: Enumerate

package info (click to toggle)
dxsamples 4.4.0-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 26,348 kB
  • ctags: 1,513
  • sloc: ansic: 10,079; sh: 8,445; java: 1,772; makefile: 1,101
file content (36 lines) | stat: -rw-r--r-- 1,091 bytes parent folder | download | duplicates (5)
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

// In this example, a list of numbers between 0 and 12 is created. There
// are three values in the list: 0, 6, and 12.
start = 0;
end = 12;
counts = 3;
enumerate_list = Enumerate(start, end, counts);
Echo("start= ",start, "end = ", end, "counts = ", counts);
Echo("list = ", enumerate_list);
Echo(" ");


// In this example, a list of vectors beginning at [0 0 0] and extending
// to [12 15 18] is created. There are 3 values in the list:
// [0 0 0], [6 7 9] and [12 15 18].
start = [0 0 0];
end = [12 15 18];
counts = 3;
enumerate_list = Enumerate(start, end, counts);
Echo("start= ",start, "end = ", end, "counts = ", counts);
Echo("list = ", enumerate_list);
Echo(" ");

// In this example, a list of vectors beginning at [0 0 0] for 3 counts 
// is created. The delta vector is specified as [3 4 5].
// There are three values in the list:
// [0 0 0], [3 4 5], and [6 8 10].
start = [0 0 0];
delta = [3 4 5];
counts = 3;
enumerate_list = Enumerate(start, NULL, counts, delta);
Echo("start= ",start, "delta = ", delta, "counts = ", counts);
Echo("list = ", enumerate_list);
Echo(" ");