pascalabcnet/PABCNetHelp/LangGuide/PABCSystemUnit/Old2016/stand_seq.html

135 lines
6.2 KiB
HTML

<html><head>
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="Range">
<param name="Keyword" value="Seq">
<param name="Keyword" value="SeqFill">
<param name="Keyword" value="SeqGen">
<param name="Keyword" value="SeqWhile">
<param name="Keyword" value="SeqRandom">
<param name="Keyword" value="SeqRandomReal">
<param name="Keyword" value="ReadSeqInteger">
<param name="Keyword" value="ReadSeqReal">
<param name="Keyword" value="ReadSeqString">
</object></head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title></title><link rel="StyleSheet" href="../../default.css"><body>
<H1>Ôóíêöèè äëÿ ðàáîòû ñ ïîñëåäîâàòåëüíîñòÿìè</H1>
<table border=0 CELLPADDING=5>
<tr>
<td>
<code><strong>function</strong> Range(a,b: integer): <strong>sequence of</strong>
integer; </code><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò ïîñëåäîâàòåëüíîñòü öåëûõ îò a äî b</td>
</tr>
<tr>
<td>
<code><strong>function</strong> Range(c1,c2: char): <strong>sequence of</strong>
char; </code><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò ïîñëåäîâàòåëüíîñòü ñèìâîëîâ îò c1 äî c2</td>
</tr>
<tr>
<td>
<code><strong>function</strong> Range(a,b: real; n: integer): <strong>
sequence of</strong> real; </code><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò ïîñëåäîâàòåëüíîñòü âåùåñòâåííûõ â òî÷êàõ ðàçáèåíèÿ
îòðåçêà [a,b] íà n ðàâíûõ ÷àñòåé</td>
</tr>
<tr>
<td>
<code><strong>function</strong> Range(a,b,step: integer): <strong>
sequence of</strong> integer; </code><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò ïîñëåäîâàòåëüíîñòü öåëûõ îò a äî b ñ øàãîì step</td>
</tr>
<tr>
<td>
<code><strong>function</strong> Seq&lt;T&gt;(<strong>params</strong> a: <strong>
array of</strong> T): <strong>sequence of</strong> T; </code><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò ïîñëåäîâàòåëüíîñòü óêàçàííûõ ýëåìåíòîâ</td>
</tr>
<tr>
<td>
<code><strong>function</strong> SeqGen&lt;T&gt;(count: integer; first: T; next: T-&gt;T): <strong>sequence of</strong> T; </code><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò ïîñëåäîâàòåëüíîñòü èç count ýëåìåíòîâ, íà÷èíàþùóþñÿ ñ
first, ñ ôóíêöèåé next ïåðåõîäà îò ïðåäûäóùåãî ê ñëåäóþùåìó</td>
</tr>
<tr><td>
<code><strong>function</strong> SeqGen&lt;T&gt;(count: integer; first,second: T; next:
(T,T)-&gt;T): <strong>sequence of</strong> T; </code><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò ïîñëåäîâàòåëüíîñòü èç count ýëåìåíòîâ, íà÷èíàþùóþñÿ ñ
first è second, ñ ôóíêöèåé next ïåðåõîäà îò äâóõ ïðåäûäóùèõ ê ñëåäóþùåìó</td></tr>
<tr><td>
<code><strong>function</strong> SeqFill&lt;T&gt;(count: integer; x: T): <strong>
sequence of</strong> T; </code><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò ïîñëåäîâàòåëüíîñòü èç count ýëåìåíòîâ x </td></tr>
<tr>
<td>
<code><strong>function</strong> SeqGen&lt;T&gt;(count: integer; f:
integer-&gt;T): <strong>sequence of</strong> T; </code><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò ïîñëåäîâàòåëüíîñòü èç count ýëåìåíòîâ, çàïîëíåííûõ
çíà÷åíèÿìè f(i) </td>
</tr>
<tr>
<td>
<code><strong>function</strong> SeqWhile&lt;T&gt;(first: T; next: T-&gt;T; pred:
T-&gt;boolean): <strong>sequence</strong> <strong>of</strong> T; </code><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò ïîñëåäîâàòåëüíîñòü ýëåìåíòîâ ñ íà÷àëüíûì çíà÷åíèåì
first, ôóíêöèåé next ïåðåõîäà îò ïðåäûäóùåãî ê ñëåäóþùåìó è óñëîâèåì
pred ïðîäîëæåíèÿ ïîñëåäîâàòåëüíîñòè </td>
</tr>
<tr><td>
<code><strong>function</strong> SeqWhile&lt;T&gt;(first,second: T; next: (T,T)-&gt;T;
pred: T-&gt;boolean): <strong>sequence</strong> <strong>of</strong> T; </code><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò ïîñëåäîâàòåëüíîñòü ýëåìåíòîâ, íà÷èíàþùóþñÿ ñ first è
second, ñ ôóíêöèåé next ïåðåõîäà îò äâóõ ïðåäûäóùèõ ê ñëåäóþùåìó è óñëîâèåì
pred ïðîäîëæåíèÿ ïîñëåäîâàòåëüíîñòè </td></tr>
<tr><td>
<code><strong>function</strong> SeqRandom(n: integer := 10; a: integer := 0;
b: integer := 100): <strong>sequence of</strong> integer; </code><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò ïîñëåäîâàòåëüíîñòü èç n ñëó÷àéíûõ öåëûõ ýëåìåíòîâ </td></tr>
<tr>
<td>
<code><strong>function</strong> SeqRandomReal(n: integer := 10; a: real :=
0; b: real := 10): <strong>sequence of</strong> real; </code><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò ïîñëåäîâàòåëüíîñòü èç n ñëó÷àéíûõ âåùåñòâåííûõ ýëåìåíòîâ</td>
</tr>
<tr>
<td>
<code><strong>function</strong> ReadSeqInteger(n: integer): <strong>
sequence of </strong> integer; </code><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò ïîñëåäîâàòåëüíîñòü èç n öåëûõ, ââåäåííûõ ñ êëàâèàòóðû</td>
</tr>
<tr>
<td>
<code><strong>function</strong> ReadSeqInteger(<strong>const</strong>
prompt: string; n: integer): <strong>sequence of</strong> integer; </code><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âûâîäèò ïðèãëàøåíèå ê ââîäó è âîçâðàùàåò ïîñëåäîâàòåëüíîñòü èç n
öåëûõ, ââåäåííûõ ñ êëàâèàòóðû</td>
</tr>
<tr>
<td>
<code><strong>function</strong> ReadSeqReal(n: integer): <strong>sequence of</strong>
real; </code><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò ïîñëåäîâàòåëüíîñòü èç n âåùåñòâåííûõ, ââåäåííûõ ñ
êëàâèàòóðû</td>
</tr>
<tr>
<td>
<code><strong>function</strong> ReadSeqReal(const prompt: string; n:
integer): <strong>sequence of</strong> real; </code><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âûâîäèò ïðèãëàøåíèå ê ââîäó è âîçâðàùàåò ïîñëåäîâàòåëüíîñòü èç n
âåùåñòâåííûõ, ââåäåííûõ ñ êëàâèàòóðû</td>
</tr>
<tr>
<td>
<code><strong>function</strong> ReadSeqString(n: integer): <strong>sequence of</strong>
string; </code><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âîçâðàùàåò ïîñëåäîâàòåëüíîñòü èç n ñòðîê, ââåäåííûõ ñ êëàâèàòóðû</td>
</tr>
<tr><td>
<code><strong>function</strong> ReadSeqString(<strong>const</strong> prompt:
string; n: integer): <strong>sequence of</strong> string; </code><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Âûâîäèò ïðèãëàøåíèå ê ââîäó è âîçâðàùàåò
ïîñëåäîâàòåëüíîñòü èç n ñòðîê,
ââåäåííûõ ñ êëàâèàòóðû</td></tr>
</table>
</body></html>