From 3d45ab8e594e83afed83735ee857e92637f2c50a Mon Sep 17 00:00:00 2001 From: Jeroen van Wolffelaar Date: Mon, 13 Aug 2001 19:27:45 +0000 Subject: [PATCH] Fix a few types, and beatifying examples (according to PEAR) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@54604 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/aspell.xml | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/functions/aspell.xml b/functions/aspell.xml index 3d7869bd8e..d1c241d90b 100644 --- a/functions/aspell.xml +++ b/functions/aspell.xml @@ -1,4 +1,4 @@ - + Aspell functions Aspell @@ -33,7 +33,7 @@ Description - int aspell_new + resource aspell_new string master string personal @@ -41,12 +41,13 @@ aspell_new opens up a new dictionary and returns the dictionary link identifier for use in other aspell - functions. + functions. Returns &false; on error. + <function>aspell_new</function> -$aspell_link=aspell_new ("english"); +$aspell_link = aspell_new("english"); @@ -63,7 +64,7 @@ $aspell_link=aspell_new ("english"); bool aspell_check - int dictionary_link + resource dictionary_link string word @@ -75,8 +76,9 @@ $aspell_link=aspell_new ("english"); <function>aspell_check</function> -$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 @@ if (aspell_check ($aspell_link, "testt")) { bool aspell_check_raw - int dictionary_link + resource dictionary_link string word @@ -112,8 +114,9 @@ if (aspell_check ($aspell_link, "testt")) { <function>aspell_check_raw</function> -$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 @@ if (aspell_check_raw ($aspell_link, "test")) { array aspell_suggest - int dictionary_link + resource dictionary_link string word @@ -146,13 +149,13 @@ if (aspell_check_raw ($aspell_link, "test")) { <function>aspell_suggest</function> -$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"; } } @@ -178,4 +181,5 @@ sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: +vi: et:ts=1:sw=1:textwidth=78:syntax=sgml -->