cvs: phpdoc-ro /reference/var/functions is-scalar.xml
| From: | Simion Onea | Date: | Thu, 15 May 2008 08:54:29 +0000 |
| Subject: | cvs: phpdoc-ro /reference/var/functions is-scalar.xml | ||
| Groups: | php.doc.ro | ||
| Request: | Send a blank email to doc-ro+get-438@lists.php.net to get a copy of this message | ||
simionea Thu May 15 08:54:29 2008 UTC
Modified files:
/phpdoc-ro/reference/var/functions is-scalar.xml
Log:
Updated the file.
http://cvs.php.net/viewvc.cgi/phpdoc-ro/reference/var/functions/is-scalar.xml?r1=1.3&r2=1.4&diff_format=u
Index: phpdoc-ro/reference/var/functions/is-scalar.xml
diff -u phpdoc-ro/reference/var/functions/is-scalar.xml:1.3
phpdoc-ro/reference/var/functions/is-scalar.xml:1.4
--- phpdoc-ro/reference/var/functions/is-scalar.xml:1.3 Tue Sep 18 14:05:18 2007
+++ phpdoc-ro/reference/var/functions/is-scalar.xml Thu May 15 08:54:29 2008
@@ -1,36 +1,77 @@
-<?xml version="1.0" encoding="iso-8859-2"?>
-<!-- EN-Revision: 1.0 Maintainer: adiju Status: outdated -->
-<!-- splitted from ./ro/functions/var.xml, last change in rev 1.1 -->
-<!-- last change to 'is-scalar' in en/ tree in rev 1.35 -->
- <refentry xml:id="function.is-scalar" xmlns="http://docbook.org/ns/docbook">
- <refnamediv>
- <refname>is_scalar</refname>
- <refpurpose>
- Decide dacã o variabilã este un scalar
- </refpurpose>
- </refnamediv>
- <refsect1>
- <title>Descriere</title>
- <methodsynopsis>
- <type>bool</type><methodname>is_scalar</methodname>
-
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
- </methodsynopsis>
- <para>
- <function>is_scalar</function> returneazã &true; dacã
- <parameter>var</parameter> este un scalar, &false; în caz contrar.
- </para>
- <para>
- Variabilele de tip scalar includ tipurile <type>integer</type>,
- <type>float</type>, <type>string</type> ºi
<type>boolean</type>.
- Tipurile <type>array</type>, <type>object</type> ºi
<type>resource</type>
- nu sunt tipuri scalare.
- <informalexample>
- <programlisting role="php">
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision: 1.4 $ -->
+<!-- EN-Revision: 1.9 Maintainer: simionea Status: translated -->
+<!-- CREDITS: adiju -->
+<!-- splitted from ./en/functions/var.xml, last change in rev 1.35 -->
+<refentry xml:id="function.is-scalar" xmlns="http://docbook.org/ns/docbook">
+ <refnamediv>
+ <refname>is_scalar</refname>
+ <refpurpose>
+ DeterminÄ dacÄ o variabilÄ este un scalar
+ </refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <type>bool</type><methodname>is_scalar</methodname>
+
<methodparam><type>mixed</type><parameter>var</parameter></methodparam>
+ </methodsynopsis>
+ <para>
+ DeterminÄ dacÄ variabila datÄ este un scalar.
+ </para>
+ <para>
+ Variabilele scalare sunt acelea ce conţin un <type>integer</type>,
+ <type>float</type>, <type>string</type> sau
<type>boolean</type>.
+ Tipurile <type>array</type>, <type>object</type> Åi
<type>resource</type>
+ nu sunt scalare.
+ </para>
+ <note>
+ <para>
+ <function>is_scalar</function> nu considerÄ valorile de tip
+ <type>resource</type> a fi scalare deoarece resursele sunt tipuri de date
+ abstracte care în prezent se bazeazÄ pe numere întregi. Nu trebuie de bazat
+ pe acest detaliu de implementare, deoarece poate fi schimbat în viitor.
+ </para>
+ </note>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>var</parameter></term>
+ <listitem>
+ <para>
+ Variabila ce este evaluatÄ.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ Ãntoarce &true; dacÄ <parameter>var</parameter> este un scalar,
&false;
+ în caz contrar.
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title>Exemplu <function>is_scalar</function></title>
+ <programlisting role="php">
<!-- TODO: better example, this one can be quite misleading for unexperienced
programmers. -->
<![CDATA[
<?php
-function show_var($var) {
+function show_var($var)
+{
if (is_scalar($var)) {
echo $var;
} else {
@@ -41,44 +82,45 @@
$proteins = array("hemoglobin", "cytochrome c oxidase",
"ferredoxin");
show_var($pi);
-// afiºeazã 3.1416
+show_var($proteins)
-show_var($proteins);
-// afiºeazã:
-// array(3) {
-// [0]=>
-// string(10) "hemoglobin"
-// [1]=>
-// string(20) "cytochrome c oxidase"
-// [2]=>
-// string(10) "ferredoxin"
-// }
?>
]]>
- </programlisting>
- </informalexample>
- </para>
- <note>
- <para>
- <function>is_scalar</function> nu considerã tipul
<type>resource</type>
- ca fiind scalar, resursele fiind tipuri de date abstracte care sunt bazate
- pe valori întregi. Acest detaliu de implementare se poate modifica pe viitor,
- aºa cã nu trebuie sã scrieþi aplicaþii care sã depindã de el.
- </para>
- </note>
- <para>
- Mai consultaþi <function>is_bool</function>,
- <function>is_numeric</function>,
- <function>is_float</function>,
- <function>is_int</function>,
- <function>is_real</function>,
- <function>is_string</function>,
- <function>is_object</function>,
- <function>is_array</function> ºi
- <function>is_integer</function>.
- </para>
- </refsect1>
- </refentry>
+ </programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+3.1416
+array(3) {
+ [0]=>
+ string(10) "hemoglobin"
+ [1]=>
+ string(20) "cytochrome c oxidase"
+ [2]=>
+ string(10) "ferredoxin"
+}
+]]>
+ </screen>
+ </example>
+ </para>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>is_float</function></member>
+ <member><function>is_int</function></member>
+ <member><function>is_numeric</function></member>
+ <member><function>is_real</function></member>
+ <member><function>is_string</function></member>
+ <member><function>is_bool</function></member>
+ <member><function>is_object</function></member>
+ <member><function>is_array</function></member>
+ </simplelist>
+ </para>
+ </refsect1>
+</refentry>
<!-- Keep this comment at the end of the file
Local variables: