Page 12 of 15
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Fri Apr 22, 2011 7:13 pm
by Demivec
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.
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Thu May 05, 2011 2:42 am
by IdeasVacuum
The ScrollBarGadget() code example does not scroll anything, which is rather unhelpful
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Thu Jun 16, 2011 9:53 pm
by Demivec
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:
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)
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.
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Tue Jul 26, 2011 12:46 pm
by moogle
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.
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Wed Aug 10, 2011 8:50 am
by rudd68
This code works fine for the increment of a large number as string:
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
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.
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Sat Aug 13, 2011 3:14 pm
by gnozal
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..."
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Sat Aug 13, 2011 5:03 pm
by c4s
@gnozal
No it should be:
[...] you get the three versions of PureBasic (Linux, Windows and MacOS X) for the same price.
...because the Amiga version is Open Source and discontinued!
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Thu Aug 18, 2011 1:02 pm
by rudd68
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Wed Aug 24, 2011 6:21 pm
by skywalk
Code: Select all
; FROM:
LoadSprite(0, "Data/PureBasicLogo.bmp")
; TO:
LoadSprite(0, #PB_Compiler_Home+"Examples\Sources\Data\PureBasicLogo.bmp")
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Fri Sep 09, 2011 1:25 am
by Demivec
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().
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Sun Sep 11, 2011 11:12 am
by Andre
Fixed.
Other topics I will add to my first post, which need to be reviewed by Fred & freak

Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Sun Sep 11, 2011 11:20 am
by Andre
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.
It's linked the same way, than other commands (BackColor()....) and all is working on Windows/MacOS (my used systems).
Could you please check again?
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Sun Sep 11, 2011 11:24 am
by Andre
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).
The officially and reworked documentation of PB4.60 just says, that the return value is non-zero on success, and zero else.
Nothing more could be relied on, I think.
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Sun Sep 11, 2011 11:28 am
by Andre
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...)
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Fri Sep 23, 2011 7:20 pm
by Andre
"ToDo" list in the first post was updated/extended
