PureBasic Docs - Errors & needed improvements to the man
Moderator: Documentation Editors
Re: PureBasic Docs - Errors & needed improvements to the man
The entry for procedures and their return values should document that if a procedure doesn't include a 'ProcedureReturn' the return value defaults to zero.
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: PureBasic Docs - Errors & needed improvements to the man
The ScrollBarGadget() code example does not scroll anything, which is rather unhelpful
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: PureBasic Docs - Errors & needed improvements to the man
The CopyMemoryString() should be updated to describe the need to allow space for the #Null at the end of a string to written to the buffer also, even though the pointer that will be updated by CopyMemoryString() will correct the pointer to overwrite that #Null on subsequent use (thus leaving only the #Null from the most immediate use). This will mean that the pointer points to the ending #Null after each use.
The current CopyMemoryString() documentation states nothing about copying the #Null. Neither does it demonstrate this with the example provided in the manual.
Here's the example for reference:
CopyMemoryString() must 'apparently' be copying the #Null at the end of the string and then adjusting the value of the pointer by 1 so that the next string copied will be placed over the #Null that was previously copied. This behavior of the CopyMemoryString() should be documented so that the special case of a precisely sized buffer can be properly dealt with.
The current CopyMemoryString() documentation states nothing about copying the #Null. Neither does it demonstrate this with the example provided in the manual.
Here's the example for reference:
Code: Select all
*Buffer = AllocateMemory(1000)
*Pointer = *Buffer
CopyMemoryString("Hello", @*Pointer)
CopyMemoryString(" World") ; This one will be put just after "Hello"
*Pointer-2 ; Come back from 2 characters (on the 'l' of 'World')
CopyMemoryString("LD") ; Finally the last letter will be uppercase
Debug PeekS(*Buffer)
Re: PureBasic Docs - Errors & needed improvements to the man
I don't know if this has been said before (I see some functions but not all) but for deprecated functions could they be left in the helpfile but have the same red writing saying it's deprecated with a hyperlink to the replacement function.
It would speed up searching for help on editing code from older PB versions.
It would speed up searching for help on editing code from older PB versions.
Re: PureBasic Docs - Errors & needed improvements to the man
This code works fine for the increment of a large number as string:Please insert in the documentation the static array dimensioning with zero [0] and give the note that there is no index overflow.
The apostrophes are only written in the "Strings - Asc" section. But the apostrophes converts a constant char to the ascii value, its appearance resembles an operator more than a function. Apostrophes should also be mentioned in the "Operators" section.
Apostrophes are a valid notation. They should also be mentioned in the "Syntax" section.
Thank you.
Code: Select all
Structure char
c.c[0]
EndStructure
Procedure.s Inkrementieren(Zahl.s)
Protected *char.char = @Zahl
Protected Pos.i = Len(Zahl) - 1
While Pos >= 0
If *char\c[Pos] = '9'
*char\c[Pos] = '0'
Else
*char\c[Pos] + 1
ProcedureReturn Zahl
EndIf
Pos - 1
Wend
ProcedureReturn "1" + Zahl
EndProcedure
Define Zahl.s
Define i.i
For i = 1 To 20
Zahl = Inkrementieren(Zahl)
Debug Zahl
Next
The apostrophes are only written in the "Strings - Asc" section. But the apostrophes converts a constant char to the ascii value, its appearance resembles an operator more than a function. Apostrophes should also be mentioned in the "Operators" section.
Apostrophes are a valid notation. They should also be mentioned in the "Syntax" section.
Thank you.
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Re: PureBasic Docs - Errors & needed improvements to the man
Ordering topic in Purebasic.chm :
"... you get the three versions of PureBasic (Amiga, Linux and Windows) for the same price..."
should be replaced with
"... you get the four versions of PureBasic (Amiga, Linux Windows and MacOS X) for the same price..."
"... you get the three versions of PureBasic (Amiga, Linux and Windows) for the same price..."
should be replaced with
"... you get the four versions of PureBasic (Amiga, Linux Windows and MacOS X) for the same price..."
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Re: PureBasic Docs - Errors & needed improvements to the man
@gnozal
No it should be:
No it should be:
...because the Amiga version is Open Source and discontinued![...] you get the three versions of PureBasic (Linux, Windows and MacOS X) for the same price.
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Re: PureBasic Docs - Errors & needed improvements to the man
Please insert this into the doc: http://www.purebasic.fr/german/viewtopi ... 80#p294580
Re: PureBasic Docs - Errors & needed improvements to the man
PB Manual wrote:http://www.purebasic.com/documentation/ ... en.pb.html
Code: Select all
; FROM:
LoadSprite(0, "Data/PureBasicLogo.bmp")
; TO:
LoadSprite(0, #PB_Compiler_Home+"Examples\Sources\Data\PureBasicLogo.bmp")
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: PureBasic Docs - Errors & needed improvements to the man
I hope I'm not jumping the gun on this. These changes may have been planned but not yet implemented.
Some updating of the docs is needed relating to the Gadget library and regarding the new CanvasGadget in v4.60RC1, in case it was overlooked.
Links needed to be added linking to the CanvasGadget entry from the entries for GetGadgetAttribute(), SetGadgetAttribute(), and GadgetToolTip().
Some updating of the docs is needed relating to the Gadget library and regarding the new CanvasGadget in v4.60RC1, in case it was overlooked.
Links needed to be added linking to the CanvasGadget entry from the entries for GetGadgetAttribute(), SetGadgetAttribute(), and GadgetToolTip().
- Andre
- PureBasic Team
- Posts: 2058
- Joined: Fri Apr 25, 2003 6:14 pm
- Location: Germany (Saxony, Deutscheinsiedel)
- Contact:
Re: PureBasic Docs - Errors & needed improvements to the man
Fixed.nco2k wrote:http://www.purebasic.com/documentation/ ... depth.htmlCode: Select all
PB_Image_InternalDepth -> #PB_Image_InternalDepth PB_Image_OriginalDepth -> #PB_Image_OriginalDepth
Other topics I will add to my first post, which need to be reviewed by Fred & freak
- Andre
- PureBasic Team
- Posts: 2058
- Joined: Fri Apr 25, 2003 6:14 pm
- Location: Germany (Saxony, Deutscheinsiedel)
- Contact:
Re: PureBasic Docs - Errors & needed improvements to the man
It's linked the same way, than other commands (BackColor()....) and all is working on Windows/MacOS (my used systems).Trond wrote:Linux 4.51:
On the page for FrontColor() there is a link to the color table, but nothing happen when you click it.
Could you please check again?
- Andre
- PureBasic Team
- Posts: 2058
- Joined: Fri Apr 25, 2003 6:14 pm
- Location: Germany (Saxony, Deutscheinsiedel)
- Contact:
Re: PureBasic Docs - Errors & needed improvements to the man
The officially and reworked documentation of PB4.60 just says, that the return value is non-zero on success, and zero else.Demivec wrote:....cipher library the function AESEncoder() and AESDecoder() ...
The return type is incorrectly shown as being a string but it is actually the length in bytes of the string placed in the output buffer. The documentation for each of the two functions does not specify anything about what this return value actually contains or how to interpret it.
Also the return value for AESEncoder() equals zero if the input string was unable to be encoded (due to its length being less than 16 bytes).
Nothing more could be relied on, I think.
- Andre
- PureBasic Team
- Posts: 2058
- Joined: Fri Apr 25, 2003 6:14 pm
- Location: Germany (Saxony, Deutscheinsiedel)
- Contact:
Re: PureBasic Docs - Errors & needed improvements to the man
While many library descriptions are re-done for PB4.60 documention, there are still a lot suggestions / bug-reports valid and need to be checked / integrated in the docs by Fred & freak.
That's why I have revised the first post in this thread, to have an overview, which can be marked as "Done", when it's done...
(more postings in this thread need to be revised and integrated in the ToDo list in first posting...)
That's why I have revised the first post in this thread, to have an overview, which can be marked as "Done", when it's done...
(more postings in this thread need to be revised and integrated in the ToDo list in first posting...)
- Andre
- PureBasic Team
- Posts: 2058
- Joined: Fri Apr 25, 2003 6:14 pm
- Location: Germany (Saxony, Deutscheinsiedel)
- Contact:
Re: PureBasic Docs - Errors & needed improvements to the man
"ToDo" list in the first post was updated/extended