projman/hlp/ru/tcl/package.html
2015-10-19 14:27:31 +04:00

168 lines
7.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>package</title>
</head>
<body>
<h1>package</h1>
<p>ëÏÍÁÎÄÁ ÚÁÇÒÕÚËÉ ÐÁËÅÔÏ× ÂÉÂÌÉÏÔÅË É ËÏÎÔÒÏÌÑ ×ÅÒÓÉÊ.</p>
<h2>óéîôáëóéó</h2>
<pre>
<a href="#forget"><strong>package</strong> <strong>forget</strong></a> <em>package</em>
<a href="#ifneeded"><strong>package</strong> <strong>ifneeded</strong></a> <em>package</em> <em>version</em> ?<em>script</em>?
<a href="#names"><strong>package</strong> <strong>names</strong></a>
<a href="#provide"><strong>package</strong> <strong>provide</strong></a> <em>package</em> ?<em>version</em>?
<a href="#require"><strong>package</strong> <strong>require</strong> ?<strong>-exact</strong>?</a> <em>package</em> ?<em>version</em>?
<a href="#unknown"><strong>package</strong> <strong>unknown</strong></a> ?<em>command</em>?
<a href="#vcompare"><strong>package</strong> <strong>vcompare</strong></a> <em>version1</em> <em>version2</em>
<a href="#versions"><strong>package</strong> <strong>versions</strong></a> <em>package</em>
<a href="#vsatisfies"><strong>package</strong> <strong>vsatisfies</strong></a> <em>version1</em> <em>version2</em>
</pre>
<h2>ïðéóáîéå</h2>
<p>ëÏÍÁÎÄÁ ÐÏÄÄÅÒÖÉ×ÁÅÔ ÐÒÏÓÔÕÀ ÂÁÚÕ ÄÁÎÎÙÈ ÓÏ Ó×ÅÄÅÎÉÑÍÉ Ï ÔÏÍ,
ËÁËÉÅ ÐÁËÅÔÙ ÂÉÂÌÉÏÔÅÞÎÙÈ ÆÕÎËÃÉÊ ÄÏÓÔÕÐÎÙ ÄÌÑ ÉÓÐÏÌØÚÏ×ÁÎÉÑ ×
ÄÁÎÎÏÍ ÉÎÔÅÒÐÒÅÔÁÔÏÒÅ, É ËÁË ÉÈ ÚÁÇÒÕÚÉÔØ × ÉÎÔÅÒÐÒÅÔÁÔÏÒ. ïÎÁ
ÐÏÄÄÅÒÖÉ×ÁÅÔ ÍÎÏÇÏ×ÅÒÓÉÏÎÎÏÓÔØ ÐÁËÅÔÏ× É ÇÁÒÁÎÔÉÒÕÅÔ ÚÁÇÒÕÚËÕ ×
ÐÒÉÌÏÖÅÎÉÅ ÎÅÏÂÈÏÄÉÍÏÊ ×ÅÒÓÉÉ ÐÁËÅÔÁ. ðÒÉ ÜÔÏÍ ÏÎÁ ÏÂÅÓÐÅÞÉ×ÁÅÔ
ËÏÎÔÒÏÌØ ÎÅÐÒÏÔÉ×ÏÒÅÞÉ×ÏÓÔÉ ×ÅÒÓÉÊ. ïÂÙÞÎÏ × Tcl-ÓËÒÉÐÔÁÈ
ÄÏÓÔÁÔÏÞÎÏ ÉÓÐÏÌØÚÏ×ÁÔØ ËÏÍÁÎÄÙ <strong>package</strong> <strong>require</strong> É
<strong>package</strong> <strong>provide</strong>. ïÓÔÁÌØÎÙÅ ËÏÍÁÎÄÙ ÐÒÅÄÎÁÚÎÁÞÅÎÙ ×
ÐÅÒ×ÕÀ ÏÞÅÒÅÄØ ÄÌÑ ÓÉÓÔÅÍÎÙÈ ÓËÒÉÐÔÏ×, ËÏÔÏÒÙÅ ÐÏÄÄÅÒÖÉ×ÁÀÔ ÂÁÚÕ
ÄÁÎÎÙÈ ÐÁËÅÔÏ×.</p>
<p>ðÏ×ÅÄÅÎÉÅ ËÏÍÁÎÄÙ <strong>package</strong> ÏÐÒÅÄÅÌÑÅÔÓÑ ÅÅ ÐÅÒ×ÙÍ
ÁÒÇÕÍÅÎÔÏÍ. îÉÖÅ ÏÐÉÓÁÎÙ ×ÏÚÍÏÖÎÙÅ ÆÏÒÍÙ ËÏÍÁÎÄÙ.</p>
<dl>
<dt><a name="forget"></a><strong>package</strong> <strong>forget</strong>
<em>package</em></dt>
<dd>õÄÁÌÑÅÔ ÉÎÆÏÒÍÁÃÉÀ Ï ÐÁËÅÔÅ ÉÚ ÉÎÔÅÒÐÒÅÔÁÔÏÒÁ, ×ËÌÀÞÁÑ ËÁË
ÉÎÆÏÒÍÁÃÉÀ, ×ÏÚ×ÒÁÝÁÅÍÕÀ ËÏÍÁÎÄÏÊ <strong>package</strong>
<strong>ifneeded</strong>, ÔÁË É ÉÎÆÏÒÍÁÃÉÀ, ×ÏÚ×ÒÁÝÁÅÍÕÀ ËÏÍÁÎÄÏÊ
<strong>package</strong> <strong>provide</strong>.</dd>
<dt><a name="ifneeded"></a><strong>package</strong>
<strong>ifneeded</strong> <em>package</em> <em>version</em> ?<em>script</em>?</dt>
<dd>ëÏÍÁÎÄÁ ÉÓÐÏÌØÚÕÅÔÓÑ × ÓÉÓÔÅÍÎÙÈ ÓËÒÉÐÔÁÈ. åÓÌÉ ÕËÁÚÁÎÁ
ËÏÎËÒÅÔÎÁÑ ×ÅÒÓÉÑ É ÓËÒÉÐÔ, ÚÁÎÏÓÉÔ × ÂÁÚÕ ÄÁÎÎÙÈ ÉÎÆÏÒÍÁÃÉÀ Ï
ÔÏÍ, ÞÔÏ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÁÑ ×ÅÒÓÉÑ ÐÁËÅÔÁ ÄÏÓÔÕÐÎÁ É ÍÏÖÅÔ ÂÙÔØ
ÚÁÇÒÕÖÅÎÁ × ÉÎÔÅÒÐÒÅÔÁÔÏÒ Ó ÐÏÍÏÝØÀ ÓËÒÉÐÔÁ
<em>script</em>. åÓÌÉ × ÂÁÚÅ ÄÁÎÎÙÈ ÕÖÅ ÈÒÁÎÉÔÓÑ ÉÎÆÏÒÍÁÃÉÑ Ï
ÓËÒÉÐÔÅ, ÏÎÁ ÏÂÎÏ×ÌÑÅÔÓÑ. åÓÌÉ ÓËÒÉÐÔ ÎÅ ÕËÁÚÁÎ, ×ÏÚ×ÒÁÝÁÅÔÓÑ
ÔÅËÕÝÉÊ ÓËÒÉÐÔ.</dd>
<dt><a name="names"></a><strong>package</strong> <strong>names</strong></dt>
<dd>÷ÏÚ×ÒÁÝÁÅÔ ÓÐÉÓÏË ×ÓÅÈ ÐÁËÅÔÏ× × ÉÎÔÅÒÐÒÅÔÁÔÏÒÅ, ÄÌÑ ËÏÔÏÒÙÈ
ÉÚ×ÅÓÔÎÁ ÄÏÓÔÕÐÎÁÑ ×ÅÒÓÉÑ (ÚÁÄÁÎÎÁÑ Ó ÐÏÍÏÝØÀ ËÏÍÁÎÄÙ
<strong>package</strong> <strong>provide</strong>) ÉÌÉ ÓËÒÉÐÔ ÚÁÇÒÕÚËÉ (ÚÁÄÁÎÎÙÊ
ËÏÍÁÎÄÏÊ <strong>package</strong> <strong>ifneeded</strong>).</dd>
<dt><a name="provide"></a><strong>package</strong> <strong>provide</strong>
<em>package</em> ?<em>version</em>?</dt>
<dd>ëÏÍÁÎÄÁ ÉÓÐÏÌØÚÕÅÔÓÑ ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÕËÁÚÁÔØ, ÞÔÏ ×ÅÒÓÉÑ
<em>version</em> ÐÁËÅÔÁ <em>package</em> ÚÁÇÒÕÖÅÎÁ ×
ÉÎÔÅÒÐÒÅÔÁÔÏÒ. åÓÌÉ ÒÁÎÅÅ ÂÙÌÁ ÚÁÇÒÕÖÅÎÁ ÄÒÕÇÁÑ ×ÅÒÓÉÑ,
×ÏÚ×ÒÁÝÁÅÔ ÏÛÉÂËÕ. åÓÌÉ ×ÅÒÓÉÑ ÎÅ ÕËÁÚÁÎÁ, ×ÏÚ×ÒÁÝÁÅÔ
ÚÁÇÒÕÖÅÎÎÕÀ ×ÅÒÓÉÀ.</dd>
<dt><a name="require"></a><strong>package</strong> <strong>require</strong>
?<strong>-exact</strong>? <em>package</em> ?<em>version</em>?</dt>
<dd><p>ëÏÍÁÎÄÁ ÉÓÐÏÌØÚÕÅÔÓÑ, ÅÓÌÉ ÄÌÑ ×ÙÐÏÌÎÅÎÉÑ ÄÁÌØÎÅÊÛÅÇÏ
ËÏÄÁ ÎÅÏÂÈÏÄÉÍ ÂÉÂÌÉÏÔÅÞÎÙÊ ÐÁËÅÔ <em>package</em> ×ÅÒÓÉÉ <em>
version</em>. ëÏÍÁÎÄÁ ×ÏÚ×ÒÁÝÁÅÔ ÎÏÍÅÒ ÚÁÇÒÕÖÅÎÎÏÊ ×ÅÒÓÉÉ ÉÌÉ
ÏÛÉÂËÕ. åÓÌÉ ÐÒÉÓÕÔÓÔ×ÕÀÔ ÏÂÁ ÁÒÇÕÍÅÎÔÁ <strong>-exact</strong> É
<em>version</em>, ÔÏ ËÏÍÁÎÄÁ ÚÁÇÒÕÖÁÅÔ ÉÍÅÎÎÏ ÕËÁÚÁÎÎÕÀ ×ÅÒÓÉÀ
(ÉÌÉ ×ÙÄÁÅÔ ÏÛÉÂËÕ, ÅÓÌÉ ÜÔÁ ×ÅÒÓÉÑ ÎÅÄÏÓÔÕÐÎÁ). åÓÌÉ
ÐÒÉÓÕÔÓÔ×ÕÅÔ ÎÏÍÅÒ ×ÅÒÓÉÉ, Á <strong>-exact</strong> ÏÐÕÝÅÎÏ, ÔÏ ËÏÍÁÎÄÁ
ÚÁÇÒÕÖÁÅÔ ÕËÁÚÁÎÎÕÀ ×ÅÒÓÉÀ ÉÌÉ ÂÏÌÅÅ ÐÏÚÄÎÀÀ, ÎÏ Ó ÔÅÍ ÖÅ
ÓÔÁÒÛÉÍ ÎÏÍÅÒÏÍ ×ÅÒÓÉÉ (2.7, ÎÏ ÎÅ 3.1, ËÏÇÄÁ ÕËÁÚÁÎÁ ×ÅÒÓÉÑ
2.5).</p>
<p>åÓÌÉ ÂÁÚÁ ÄÁÎÎÙÈ ÎÅ ÓÏÄÅÒÖÉÔ ÎÅÏÂÈÏÄÉÍÏÊ ×ÅÒÓÉÉ, Á ×
ÉÎÔÅÒÐÒÅÔÁÔÏÒÅ ÏÐÒÅÄÅÌÅÎÁ ËÏÍÁÎÄÁ ÄÌÑ <strong>packageunknown</strong>
(ÓÍ. ÎÉÖÅ), ÔÏ ÏÎÁ ÉÓÐÏÌÎÑÅÔÓÑ, ÐÏÓÌÅ ÞÅÇÏ ÐÏ×ÔÏÒÎÏ
ÐÒÏ×ÅÒÑÅÔÓÑ ÄÏÓÔÕÐÎÏÓÔØ ÎÅÏÂÈÏÄÉÍÏÊ ×ÅÒÓÉÉ. åÓÌÉ ×ÅÒÓÉÑ
ÐÏ-ÐÒÅÖÎÅÍÕ ÎÅÄÏÓÔÕÐÎÁ, ËÏÍÁÎÄÁ ×ÏÚ×ÒÁÝÁÅÔ ÏÛÉÂËÕ.</p>
</dd>
<dt><a name="unknown"></a><strong>package</strong> <strong>unknown</strong>
?<em>command</em>?</dt>
<dd><p>ëÏÍÁÎÄÁ <em>ÐÏÓÌÅÄÎÅÊ ÎÁÄÅÖÄÙ</em> ÐÒÉ ÐÏÉÓËÅ ÎÅÏÂÈÏÄÉÍÏÊ
×ÅÒÓÉÉ ÐÁËÅÔÁ. åÓÌÉ ÁÒÇÕÍÅÎÔ <em>command</em> ÕËÁÚÁÎ, ÔÏ ÏÎ
ÄÏÐÏÌÎÑÅÔÓÑ ÉÍÅÎÅÍ ÐÁËÅÔÁ É ×ÅÒÓÉÉ É ÐÏÌÕÞÅÎÎÙÊ ÓËÒÉÐÔ
×ÙÐÏÌÎÑÅÔÓÑ. åÓÌÉ ×ÅÒÓÉÑ ÎÅ ÕËÁÚÁÎÁ, ÐÏÄÓÔÁ×ÌÑÅÔÓÑ ÐÕÓÔÁÑ
ÓÔÒÏËÁ.</p>
<p>åÓÌÉ ÁÒÇÕÍÅÎÔ <em>command</em> ÎÅ ÕËÁÚÁÎ, ×ÏÚ×ÒÁÝÁÅÔ ÔÅËÕÝÉÊ
ÓËÒÉÐÔ, ÚÁÄÁÎÎÙÊ ÄÌÑ ËÏÍÁÎÄÙ <strong>package</strong>
<strong>unknown</strong>.</p>
</dd>
<dt><a name="vcompare"></a><strong>package</strong>
<strong>vcompare</strong> <em>version1</em> <em>version2</em></dt>
<dd>ëÏÍÁÎÄÁ ÓÒÁ×ÎÅÎÉÑ ×ÅÒÓÉÊ. ÷ÏÚ×ÒÁÝÁÅÔ <strong>-1</strong>, ÅÓÌÉ
<em>version1</em> ÂÏÌÅÅ ÒÁÎÎÑÑ ×ÅÒÓÉÑ, ÞÅÍ <em>version2</em>,
<strong>1</strong> - × ÐÒÏÔÉ×ÎÏÍ ÓÌÕÞÁÅ, É <strong>0</strong>, ÅÓÌÉ ÏÎÉ
ÒÁ×ÎÙ.</dd>
<dt><a name="versions"></a><strong>package</strong>
<strong>versions</strong> <em>package</em></dt>
<dd>÷ÏÚ×ÒÁÝÁÅÔ ÓÐÉÓÏË ×ÓÅÈ ÄÏÓÔÕÐÎÙÈ ×ÅÒÓÉÊ ÐÁËÅÔÁ (ÉÎÆÏÒÍÁÃÉÑ Ï
ËÏÔÏÒÙÈ ÚÁÎÅÓÅÎÁ × ÂÁÚÕ ÄÁÎÎÙÈ Ó ÐÏÍÏÝØÀ ËÏÍÁÎÄÙ
<strong>package</strong> <strong>ifneeded</strong>).</dd>
<dt><a name="vsatisfies"></a><strong>package</strong>
<strong>vsatisfies</strong> <em>version1</em> <em>version2</em></dt>
<dd>×ÏÚ×ÒÁÝÁÅÔ <strong>1</strong>, ÅÓÌÉ Õ <em>version1</em> É
<em>version2</em> ÓÏ×ÐÁÄÁÀÔ ÓÔÁÒÛÉÅ ÎÏÍÅÒÁ, Á ÍÌÁÄÛÉÊ ÎÏÍÅÒ Õ
version1 ÎÅ ÍÅÎØÛÅ, ÞÅÍ Õ <em>version2</em>, É <strong>0</strong> - ×
ÐÒÏÔÉ×ÎÏÍ ÓÌÕÞÁÅ.</dd>
</dl>
<h2><a name="éîäåëóù ðáëåôï÷"></a>éîäåëóù ðáëåôï÷</h2>
<p>òÅËÏÍÅÎÄÏ×ÁÎÎÙÊ ÓÐÏÓÏ ÒÁÂÏÔÙ Ó ÐÁËÅÔÁÍÉ × Tcl ÓÏÓÔÏÉÔ × ÔÏÍ,
ÞÔÏÂÙ ×ËÌÀÞÁÔØ × ÓËÒÉÐÔÙ ËÏÍÁÎÄÙ <a
href="#require"><strong>package</strong> <strong>require</strong></a> É <a
href="#provide"><strong>package</strong>
<strong>provide</strong></a> É ÉÓÐÏÌØÚÏ×ÁÔØ ÐÒÏÃÅÄÕÒÕ <strong><a
href="pkg_mkIndex.html">pkg_mkIndex</a></strong> (ÓÍ.
ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÉÅ ÐÕÎËÔÙ) ÄÌÑ ÓÏÚÄÁÎÉÑ ÉÎÄÅËÓÎÙÈ ÆÁÊÌÏ× ÄÌÑ
ÐÁËÅÔÏ×. üÔÏ ÏÂÅÓÐÅÞÉ×ÁÅÔ Á×ÔÏÍÁÔÉÞÅÓËÕÀ ÚÁÇÒÕÚËÕ ÎÅÏÂÈÏÄÉÍÙÈ
ÐÁËÅÔÏ×.</p>
<p>óÍ.ÔÁËÖÅ <a href="close.html"><strong>close</strong></a>(n), <a
href="filename.html"><strong>filename</strong></a>(n), <a href=
"gets.html"><strong>gets</strong></a>(n), <a
href="read.html"><strong>read</strong></a>(n), <a
href="puts.html"><strong>puts</strong></a>(n), <a
href="exec.html"><strong>exec</strong></a>(n).</p>
</body>
</html>