Re: [PHP-DOC] Patch for #26209

2003-11-14 Thread Gabor Hojtsy
Seems to be fine to me;

Goba

Mehdi Achour wrote:
Hi !

Attached is a patch fixing http://bugs.php.net/26209
The bug could have been marked bogus, but this commit will maybe avoid 
some headaches.. any objection (or review) for it ?

didou





Index: control-structures.xml
===
RCS file: /repository/phpdoc/en/language/control-structures.xml,v
retrieving revision 1.81
diff -u -r1.81 control-structures.xml
--- control-structures.xml	30 Sep 2003 08:40:06 -	1.81
+++ control-structures.xml	13 Nov 2003 23:31:13 -
@@ -750,6 +750,49 @@
  /programlisting
  /informalexample
 /para
+para
+ Ommiting the semicolon after literalcontinue/literal can lead to
+ confusion. Here's an example of what you shouldn't do. 
+/para
+para
+ informalexample
+  programlisting role=php
+![CDATA[
+?php
+  for ($i = 0; $i  5; ++$i) {
+  if ($i == 2)
+  continue
+  print $i\n;
+  }
+?
+]]
+  /programlisting
+  para
+   One can expect the result to be :
+  /para
+  screen
+![CDATA[
+0
+1
+3
+4
+]]
+  /screen
+  para
+   but this script will output :
+  /para
+  screen
+![CDATA[
+2
+]]
+  /screen
+  para
+   because the return value of the functionprint/function
+   call is literalint(1)/literal, and it will look like the
+   optional numeric argument mentionned above.
+  /para
+ /informalexample
+/para
   /sect1
 
   sect1 id=control-structures.switch




[PHP-DOC] standardized replies

2003-11-14 Thread ali
Hi all,

watching how time goes by and having a look at phpdoc and mainly doc-de
i experienced that there are many posts by people that are not part of
the group and who are issuing things on the doc*-lists which don't
belong there.
Mostly that are questions refering to programming in PHP as you all
know. 

The idea i had, was to use standardized replies which tell the poster of
that message, that such questions are not dealt with on those lists.
In that way, we could avoid typing that stuff allover again and could
rely on such an option.

Two ways of implementation could be:
1.) having a txt-file somewhere and refer to that in a mail (Like See
http://foo.bar/wronglist.html;)
2.) attach a footer to each post (surely not on phpdoc because that
possibl would be an overkill) on the translation lists, which could look
like those on php-notes.
e.g: 

Wrong List -- http://foo.bar/[EMAIL PROTECTED]

A mail would be sent to the user automatically and the job is done.
I could imagine that other translation-teams experience the same, but i
don't know if this is worth implementing.

I had a chat with Friedhelm already and he agreed that this would make
sense. But i'd like to hear some more voices about this.


ali


[PHP-DOC] Â¥¸´ÇÑ ¼ºÀθ¸ÀÇ ¸¸³²ÀÌ ½ÃÀ۵Ǵ°÷!!

2003-11-14 Thread ¸¶½ºÅÍ
Title:!! 



   !! 
 
  100% / 

 060-607-3338  
 
 /   !

 /   !

..

 060-607-3338  
   !

!!

ok !

 060-607-3338  
-


  
[]   .[Deny] .If you don't want to receive this mail
anymore, click here [Deny] 





[PHP-DOC] cvs: phpdoc /en/language control-structures.xml

2003-11-14 Thread Mehdi Achour
didou   Fri Nov 14 11:27:23 2003 EDT

  Modified files:  
/phpdoc/en/language control-structures.xml 
  Log:
  bugfixing #26209
  
Index: phpdoc/en/language/control-structures.xml
diff -u phpdoc/en/language/control-structures.xml:1.81 
phpdoc/en/language/control-structures.xml:1.82
--- phpdoc/en/language/control-structures.xml:1.81  Tue Sep 30 04:40:06 2003
+++ phpdoc/en/language/control-structures.xml   Fri Nov 14 11:27:23 2003
@@ -1,5 +1,5 @@
 ?xml version=1.0 encoding=iso-8859-1?
-!-- $Revision: 1.81 $ --
+!-- $Revision: 1.82 $ --
  chapter id=control-structures
   titleControl Structures/title
 
@@ -748,6 +748,49 @@
 ?
 ]]
  /programlisting
+ /informalexample
+/para
+para
+ Ommiting the semicolon after literalcontinue/literal can lead to
+ confusion. Here's an example of what you shouldn't do. 
+/para
+para
+ informalexample
+  programlisting role=php
+![CDATA[
+?php
+  for ($i = 0; $i  5; ++$i) {
+  if ($i == 2)
+  continue
+  print $i\n;
+  }
+?
+]]
+  /programlisting
+  para
+   One can expect the result to be :
+  /para
+  screen
+![CDATA[
+0
+1
+3
+4
+]]
+  /screen
+  para
+   but this script will output :
+  /para
+  screen
+![CDATA[
+2
+]]
+  /screen
+  para
+   because the return value of the functionprint/function
+   call is literalint(1)/literal, and it will look like the
+   optional numeric argument mentionned above.
+  /para
  /informalexample
 /para
   /sect1


[PHP-DOC] #26209 [Opn-Csd]: 'continue' feature or bug?

2003-11-14 Thread didou
 ID:   26209
 Updated by:   [EMAIL PROTECTED]
 Reported By:  marrtins at hackers dot lv
-Status:   Open
+Status:   Closed
 Bug Type: Documentation problem
 Operating System: w2k,sp4
 PHP Version:  4.3.3
 New Comment:

This have been fixed in CVS.

I have added an example of what we shouldn't do when using continue,
guess who wrote it ? ;)

http://news.php.net/article.php?group=php.docarticle=969356927


Previous Comments:


[2003-11-12 08:14:06] [EMAIL PROTECTED]

From the documentation :

continue accepts an optional numeric argument which tells it how many
levels of enclosing loops it should skip to the end of.

and we see that :

  var_dump(print $r\n); // int(1)

you see your problem here ? Anyway, the documentation should have a
warning to avoid confusion.

didou



[2003-11-11 16:23:52] marrtins at hackers dot lv

Description:

strnge things happen (at least undocumented) with continue control
structure when using continue with and w/o semicolon

in example below continue w/o semi reproduces 2
with semi as expected 0,1,3 and 4

Reproduce code:
---
?
  for($r = 0; $r  5; ++$r) {
if($r == 2)
  continue
print $r\n;
  }
?

Expected result:

0
1
3
4

Actual result:
--
2





-- 
Edit this bug report at http://bugs.php.net/?id=26209edit=1