luk Thu May 9 17:15:33 2002 EDT Modified files: /phpdoc-cs/language control-structures.xml Log: Index: phpdoc-cs/language/control-structures.xml diff -u phpdoc-cs/language/control-structures.xml:1.5 phpdoc-cs/language/control-structures.xml:1.6 --- phpdoc-cs/language/control-structures.xml:1.5 Fri Apr 26 16:35:27 2002 +++ phpdoc-cs/language/control-structures.xml Thu May 9 17:15:33 2002 @@ -938,39 +938,34 @@ <sect1 id="function.return"> <title>return</title> <simpara> - If called from within a function, the <function>return</function> - statement immediately ends execution of the current function, and - returns its argument as the value of the function - call. <function>return</function> will also end the execution of - an <function>eval</function> statement or script file. + Zavolán uvnitř funkce, konstrukt <function>return</function> okamžitě + ukončí provádění této funkce a vrací svůj argument jako hodnotu volání + funkce. <function>return</function> také obdobně ukončí provádění + konstruktu <function>eval</function> nebo celého skriptu. </simpara> <simpara> - If called from the global scope, then execution of the current - script file is ended. If the current script file was - <function>include</function>ed or <function>require</function>ed, - then control is passed back to the calling file. Furthermore, if - the current script file was <function>include</function>ed, then - the value given to <function>return</function> will be returned as - the value of the <function>include</function> call. If - <function>return</function> is called from within the main script - file, then script execution ends. If the current script file was - named by the <link - linkend="ini.auto-prepend-file">auto_prepend_file</link> or <link - linkend="ini.auto-append-file">auto_append_file</link> - configuration options in <link linkend="configuration.file">the - configuration file</link>, then that script file's execution is - ended. + Pokud se volá z globálního kontextu, provádění skriptu se ukončí. Byl-li + aktuální skript vložen pomocí <function>include</function> nebo + <function>require</function>, předá se řízení volajícímu souboru. Navíc, + bylo-li použito <function>include</function>, bude hodnota specifikovaná + v <function>return</function> vrácena jako hodnota volání + <function>include</function>. Pokud se <function>return</function> + zavolá z hlavního souboru skriptu, provádění skončí. Když se jedná o + soubor specifikovaný pomocí konfiguračních voleb + <link linkend="ini.auto-prepend-file">auto_prepend_file</link> nebo + <link linkend="ini.auto-append-file">auto_append_file</link> + v <link linkend="configuration.file">konfiguračním souboru</link>, + zpracování souboru končí. </simpara> - <simpara>For more information, see <link - linkend="functions.returning-values">Returning values</link>. + <simpara>Více informací - viz + <link linkend="functions.returning-values">Návratové hodnoty</link>. </simpara> <note> <simpara> - Note that since <function>return</function> is a language - construct and not a function, the parentheses surrounding its - arguments are <emphasis>not</emphasis> required--in fact, it is - more common to leave them out than to use them, although it - doesn't matter one way or the other. + Uvědomte si, že <function>return</function> je jazykový konstrukt, a + nikoli funkce -- uzavření argumentů do závorek <emphasis>není</emphasis> + nutné. Obvykle se vynechávají, ale nezáleží na tom, zda se použijí či + nikoli. </simpara> </note> </sect1> @@ -980,29 +975,29 @@ <title><function>require</function></title> <simpara> - The <function>require</function> statement includes and evaluates - the specific file. + Konstrukt <function>require</function> vloží a ohodnotí specifikovaný + soubor. </simpara> <simpara> - <function>require</function> includes and evaluates a specific file. - Detailed information on how this inclusion works is described in the - documentation for <function>include</function>. + <function>require</function> vloží a ohodnotí specifikovaný soubor. + Podrobné informace o tom, jak vkládání pracuje, jsou popsány v + dokumentaci o <function>include</function>. </simpara> <simpara> - <function>require</function> and <function>include</function> - are identical in every way except how they handle failure. - <function>include</function> produces a - <link linkend="internal.e-warning">Warning</link> while - <function>require</function> results in a <link linkend="internal.e-error"> - Fatal Error</link>. In other words, don't hesitate to use - <function>require</function> if you want a missing file to halt processing - of the page. <function>include</function> does not behave this way, the - script will continue regardless. Be sure to have an appropriate - <link linkend="ini.include-path">include_path</link> setting as well. + <function>require</function> a <function>include</function> jsou totožné, + kromě toho, jak zpracovávají chyby. <function>include</function> + vyprodukuje <link linkend="internal.e-warning">Warning</link> (varování), + zatímco <function>require</function> skončí s chybou typu + <link linkend="internal.e-error">Fatal Error</link> (velmi vážná chyba). + Jinak řečeno, nerozpakujte se použít <function>require</function>, + pokud chcete, aby nepřítomnost souboru zastavila zpracování stránky. + <function>include</function> se takto nechová, skript bude nerušeně + pokračovat. Ujistěte se také, že máte v pořádku nastavení + <link linkend="ini.include-path">include_path</link>. </simpara> <para> <example> - <title>Basic <function>require</function> examples</title> + <title>Základní příklady použití <function>require</function></title> <programlisting role="php"> <![CDATA[ <?php @@ -1019,10 +1014,10 @@ </example> </para> <simpara> - See the <function>include</function> documentation for more examples. + Více příkladů -- viz dokumentace <function>include</function>. </simpara> <note> - <simpara> + <simpara> Prior to PHP 4.0.2, the following applies: <function>require</function> will always attempt to read the target file, even if the line it's on never executes. The conditional statement won't affect <function>require</function>. However,