File: TRAVERSABLE.html

package info (click to toggle)
lisaac 1%3A0.13.1-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 15,276 kB
  • ctags: 6,396
  • sloc: ansic: 242,479; xml: 635; lisp: 333; makefile: 116; sh: 73; asm: 38
file content (114 lines) | stat: -rwxr-xr-x 7,464 bytes parent folder | download | duplicates (2)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!DOCTYPE HTML SYSTEM>
<!-- Generated by Lisaac shorter / html style -->
<html>
<head>
<title>
Lisaac prototype interface
</title>
</head>
<body BGCOLOR="#FFFFFF">

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
<br><br><strong><font color="#A020F0">Section</font></strong> <strong><font color="#A020F0">Header</font></strong>
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp +</font></strong> <strong><font color="#0000FF">name</font></strong>    := <a href="TRAVERSABLE.html"><font color="#008000">TRAVERSABLE</font></a>[<font color="#008000">E</font>];
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">comment</font></strong> := <font color="#BC8F8F">"A `TRAVERSABLE[E_]' is a finite readable sequence of objects of type E_."</font>;
  
  <br><font FACE="Sans-serif" color="#000000"><B> For instance, `COLLECTION's and `STRING's are `TRAVERSABLE'.</B></font>
  <br><font FACE="Sans-serif" color="#000000"><B></B></font>
  <br><font FACE="Sans-serif" color="#000000"><B> A good performance should always be obtained by sequentially acessing a </B></font>
  <br><font FACE="Sans-serif" color="#000000"><B> `TRAVERSABLE' with increasing indexes (from `lower' to `upper'), as </B></font>
  <br><font FACE="Sans-serif" color="#000000"><B> demonstrated in the following code snippet :</B></font>
  <br><font FACE="Sans-serif" color="#000000"><B></B></font>
  <br><font FACE="Sans-serif" color="#000000"><B>  i := a_traversable.lower;</B></font>
  <br><font FACE="Sans-serif" color="#000000"><B>  {i > a_traversable.upper}.until_do {</B></font>
  <br><font FACE="Sans-serif" color="#000000"><B>    do_something_with (a_traversable.item i);</B></font>
  <br><font FACE="Sans-serif" color="#000000"><B>    i := i + 1;</B></font>
  <br><font FACE="Sans-serif" color="#000000"><B>  };</B></font>
  <br><font FACE="Sans-serif" color="#000000"><B></B></font>
  <br><font FACE="Sans-serif" color="#000000"><B> Other accessing methods (including random access and sequential access </B></font>
  <br><font FACE="Sans-serif" color="#000000"><B> from `upper' to `lower') may or may not lead to acceptable performance, </B></font>
  <br><font FACE="Sans-serif" color="#000000"><B> depending on the particular implementation of `TRAVERSABLE'.</B></font>
  
<br><br><strong><font color="#A020F0">Section</font></strong> <strong><font color="#A020F0">Inherit</font></strong>
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">parent_object</font></strong>:<a href="OBJECT.html"><font color="#008000">OBJECT</font></a> := 
  
<br><br><strong><font color="#A020F0">Section</font></strong> <strong><font color="#A020F0">Public</font></strong>
  
  <br><font FACE="Sans-serif" color="#000000"><B></B></font>
  <br><font FACE="Sans-serif" color="#000000"><B> Indexing:</B></font>
  <br><font FACE="Sans-serif" color="#000000"><B></B></font>
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">lower</font></strong>:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> <-
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Minimum index.</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp </font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  See also `upper', `valid_index', `item'.</font></strong></em>
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">upper</font></strong>:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> <-
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Maximum index.</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp </font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  See also `lower', `valid_index', `item'.</font></strong></em>
    
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">valid_index</font></strong> i:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> :<a href="BOOLEAN.html"><font color="#008000">BOOLEAN</font></a> <-
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  True when `i' is valid (i.e., inside actual bounds).</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp </font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  See also `lower', `upper', `item'.</font></strong></em>
  
  <br><font FACE="Sans-serif" color="#000000"><B></B></font>
  <br><font FACE="Sans-serif" color="#000000"><B> Counting:</B></font>
  <br><font FACE="Sans-serif" color="#000000"><B></B></font>
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">count</font></strong>:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> <-
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Number of available indices.</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp </font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  See also `is_empty', `lower', `upper'.</font></strong></em>
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">is_empty</font></strong>:<a href="BOOLEAN.html"><font color="#008000">BOOLEAN</font></a> <-
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Is collection empty ?</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp </font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  See also `count'.</font></strong></em>
    
  <br><font FACE="Sans-serif" color="#000000"><B></B></font>
  <br><font FACE="Sans-serif" color="#000000"><B> Accessing:</B></font>
  <br><font FACE="Sans-serif" color="#000000"><B></B></font>
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">item</font></strong> i:<a href="INTEGER.html"><font color="#008000">INTEGER</font></a> :<font color="#008000">E</font> <-
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  Item at the corresponding index `i'.</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp </font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  See also `lower', `upper', `valid_index'.</font></strong></em>
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">first</font></strong>:<font color="#008000">E</font> <-
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  The very `first' item.</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp </font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  See also `last', `item'.</font></strong></em>
  
  <br><br><strong><font color="#FF0000">&nbsp &nbsp -</font></strong> <strong><font color="#0000FF">last</font></strong>:<font color="#008000">E</font> <-
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  The `last' item.</font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp </font></strong></em>
  <br><em><strong><font color="#707070">&nbsp &nbsp &nbsp &nbsp  See also `first', `item'.</font></strong></em>
    
 
</body>
</html>