jeroen Mon Aug 13 15:27:46 2001 EDT
Modified files:
/phpdoc/en/functions aspell.xml
Log:
Fix a few types, and beatifying examples (according to PEAR)
Index: phpdoc/en/functions/aspell.xml
diff -u phpdoc/en/functions/aspell.xml:1.11 phpdoc/en/functions/aspell.xml:1.12
--- phpdoc/en/functions/aspell.xml:1.11 Thu Aug 2 13:36:50 2001
+++ phpdoc/en/functions/aspell.xml Mon Aug 13 15:27:45 2001
@@ -1,4 +1,4 @@
-<!-- $Revision: 1.11 $ -->
+<!-- $Revision: 1.12 $ -->
<reference id="ref.aspell">
<title>Aspell functions</title>
<titleabbrev>Aspell</titleabbrev>
@@ -33,7 +33,7 @@
<title>Description</title>
<funcsynopsis>
<funcprototype>
- <funcdef>int <function>aspell_new</function></funcdef>
+ <funcdef>resource <function>aspell_new</function></funcdef>
<paramdef>string <parameter>master</parameter></paramdef>
<paramdef>string <parameter>personal</parameter></paramdef>
</funcprototype>
@@ -41,12 +41,13 @@
<simpara>
<function>aspell_new</function> opens up a new dictionary and
returns the dictionary link identifier for use in other aspell
- functions.</simpara>
+ functions. Returns &false; on error.
+ </simpara>
<para>
<example>
<title><function>aspell_new</function></title>
<programlisting role="php">
-$aspell_link=aspell_new ("english");
+$aspell_link = aspell_new("english");
</programlisting>
</example>
</para>
@@ -63,7 +64,7 @@
<funcsynopsis>
<funcprototype>
<funcdef>bool <function>aspell_check</function></funcdef>
- <paramdef>int <parameter>dictionary_link</parameter></paramdef>
+ <paramdef>resource <parameter>dictionary_link</parameter></paramdef>
<paramdef>string <parameter>word</parameter></paramdef>
</funcprototype>
</funcsynopsis>
@@ -75,8 +76,9 @@
<example>
<title><function>aspell_check</function></title>
<programlisting>
-$aspell_link=aspell_new ("english");
-if (aspell_check ($aspell_link, "testt")) {
+$aspell_link = aspell_new("english");
+
+if (aspell_check($aspell_link, "testt")) {
echo "This is a valid spelling";
} else {
echo "Sorry, wrong spelling";
@@ -99,7 +101,7 @@
<funcsynopsis>
<funcprototype>
<funcdef>bool <function>aspell_check_raw</function></funcdef>
- <paramdef>int <parameter>dictionary_link</parameter></paramdef>
+ <paramdef>resource <parameter>dictionary_link</parameter></paramdef>
<paramdef>string <parameter>word</parameter></paramdef>
</funcprototype>
</funcsynopsis>
@@ -112,8 +114,9 @@
<example>
<title><function>aspell_check_raw</function></title>
<programlisting role="php">
-$aspell_link=aspell_new ("english");
-if (aspell_check_raw ($aspell_link, "test")) {
+$aspell_link = aspell_new("english");
+
+if (aspell_check_raw($aspell_link, "test")) {
echo "This is a valid spelling";
} else {
echo "Sorry, wrong spelling";
@@ -134,7 +137,7 @@
<funcsynopsis>
<funcprototype>
<funcdef>array <function>aspell_suggest</function></funcdef>
- <paramdef>int <parameter>dictionary_link</parameter></paramdef>
+ <paramdef>resource <parameter>dictionary_link</parameter></paramdef>
<paramdef>string <parameter>word</parameter></paramdef>
</funcprototype>
</funcsynopsis>
@@ -146,13 +149,13 @@
<example>
<title><function>aspell_suggest</function></title>
<programlisting role="php">
-$aspell_link=aspell_new ("english");
+$aspell_link = aspell_new("english");
-if (!aspell_check ($aspell_link, "test")) {
- $suggestions=aspell_suggest ($aspell_link, "test");
+if (!aspell_check($aspell_link, "test")) {
+ $suggestions = aspell_suggest($aspell_link, "test");
- for ($i=0; $i < count ($suggestions); $i++) {
- echo "Possible spelling: " . $suggestions[$i] . "<br>";
+ foreach ($suggestions as $suggestion) {
+ echo "Possible spelling: $suggestion<br>\n";
}
}
</programlisting>
@@ -178,4 +181,5 @@
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
+vi: et:ts=1:sw=1:textwidth=78:syntax=sgml
-->