php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #32960 English : dio, error logic + examples
Submitted: 2005-05-06 06:13 UTC Modified: 2005-05-06 16:06 UTC
From: jsgoupil@php.net Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2005-05-06 06:13 UTC] jsgoupil@php.net
Description:
------------
reference/dio/functions/dio-seek.xml

In the new doc you said :
"SEEK_END - Specifies that pos is a count of characters from the end of the file. A negative count specifies a position within the current extent of the file; a positive count specifies a position past the current end. If you set the position past the current end, and actually write data, you will extend the file with zeros up to that position."

And in the example :
"dio_seek($fd, SEEK_END, -10);
// position is now at 10 characters past the end of the file.
// The 10 characters between the end of the file and the current
// position are filled with zeros."


I think you do the inverse... ? you said in the doc that - remain in the file, and + pad with 0, but in the example it seems to be the inverse. You do -10, and you said it goes after the end...

If the doc is ok, it should be a little bit more explicit.




Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-05-06 06:29 UTC] jsgoupil@php.net
By the way, check the example title of dio-open.xml, dio-seek.xml

They all have : 
"<title>Setting the baud rate on a serial port</title>"
 [2005-05-06 16:06 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

Next, 2nd and 3rd parameters in dio_seek() examples were swapped.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Aug 15 17:01:28 2024 UTC