PureBasic Docs - Errors & needed improvements to the man

Found an issue in the documentation ? Please report it here !

Moderator: Documentation Editors

Marco2007
Enthusiast
Enthusiast
Posts: 639
Joined: Tue Jun 12, 2007 10:30 am
Location: not there...

Re: PureBasic Docs - Errors & needed improvements to the man

Post by Marco2007 »

http://purebasic.com/documentation/data ... eblob.html

Code: Select all

GetDatabaseBlob(#Database, Column, *buffer, bufferlength)
PureBasic for Windows
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: PureBasic Docs - Errors & needed improvements to the man

Post by blueznl »

Minor thing from the help file:
Example: Array as procedure parameter

Procedure fill(Array A.l(1), length) ; the 1 stays for the number of dimensions of (?) the array
The 1 stands for...

or perhaps better, dunno :-)

The 1 represents the number of dimensions in the array

But I'm not a native English speaker either, so... :-)
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
Vera
Addict
Addict
Posts: 858
Joined: Tue Aug 11, 2009 1:56 pm
Location: Essen (Germany)

Re: PureBasic Docs - Errors & needed improvements to the man

Post by Vera »

4.51rc2
Typo: en + de
Examples/Console.pb.html : End?

Missing image:(en)
Reference/images : vdesigner-about.png

Typo: (en)
cipher/aesencoder.html:
Its size depends of the 'Bits' parameter: l6 bytes for 128 bit

Typo: (de)
MainGuide/history.html
IDE/Debugger:
Hinzugefügt: Einrücknugs-Hilfslinien und Leerzeichen-Optionen

LINUX (win?)
DisplaySprite3D() isn't displayed as quick-help, (although it's available via F1)

greetings ~ Vera
PMV
Enthusiast
Enthusiast
Posts: 727
Joined: Sat Feb 24, 2007 3:15 pm
Location: Germany

Re: PureBasic Docs - Errors & needed improvements to the man

Post by PMV »

Please write down, what standard you are using in PB in the wrongly called "ASCII-Mode".
I mean "Windows-1252", so if some one want to convert the characters from ASCII-Mode
to use it in Unicode-Mode, he can find easily something like this:
http://en.wikipedia.org/wiki/Windows-1252

Otherwise there will be much more people with problems like this:
http://www.purebasic.fr/english/viewtop ... 74#p332374
:D

And yes, i had the same problem for ages ago. :lol:

MFG PMV
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: PureBasic Docs - Errors & needed improvements to the man

Post by srod »

Base64Decoder().
The output buffer can be up to 33% smaller than the input buffer, with a minimum size of 64 bytes. It's recommended to get a slightly larger buffer, like 30% smaller to avoid overflows.
Should the 33% not be 25% ?

When encoding then yes you require a buffer 33% in excess of the size of the source buffer. When you reverse this, however, then to my reckoning we are talking about a max of 25% smaller.
I may look like a mule, but I'm not a complete ass.
User avatar
helpy
Enthusiast
Enthusiast
Posts: 552
Joined: Sat Jun 28, 2003 12:01 am

Re: PureBasic Docs - Errors & needed improvements to the man

Post by helpy »

==> http://en.wikipedia.org/wiki/Base64:[quote]Note that given an input of n bytes, the output will be (n + 2 - ((n + 2) % 3)) / 3 * 4 bytes long, which converges to n * 4 / 3 or 1.33333n for large n.[/quote]
Windows 10 / Windows 7
PB Last Final / Last Beta Testing
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: PureBasic Docs - Errors & needed improvements to the man

Post by srod »

That is for encoding, not decoding.

Base-64 works by taking 3-bytes (24-bits) and encoding them in lots of 6-bits - thus creating 4 bytes. This gives a 33 and 1/3% increase.

Decoding does the opposite and thus reduces the buffer by at least 25%.
I may look like a mule, but I'm not a complete ass.
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Re: PureBasic Docs - Errors & needed improvements to the man

Post by c4s »

English help file for Frame3DGadget():
A note is missing, that SetGadgetText() can be used to change the frame Text$.
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Little John
Addict
Addict
Posts: 4527
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: PureBasic Docs - Errors & needed improvements to the man

Post by Little John »

srod wrote:Base-64 works by taking 3-bytes (24-bits) and encoding them in lots of 6-bits - thus creating 4 bytes. This gives a 33 and 1/3% increase.

Decoding does the opposite and thus reduces the buffer by at least 25%.
That's absolutely correct:
1 byte increase for every 3 bytes is 1/3 = 33.333...% increase. And 3 bytes + 1 byte increase = 4 bytes.
1 byte decrease for every 4 bytes is 1/4 = 25% decrease (the denominator now is 4, not 3 anymore!).

This mistake in the help is pretty typical when people do percentage calculation. ;-)

Regards, Little John
User avatar
Demivec
Addict
Addict
Posts: 4091
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: PureBasic Docs - Errors & needed improvements to the man

Post by Demivec »

The RemoveString() and ReplaceString() commands of the string library need a description of what value to use for the default search mode when specifying a StartPosition. Alternate search modes have constants defined and explained in the help file entries but a person is left to guess what to use when the default search mode is desired while also specifying a StartPosition parameter.
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Re: PureBasic Docs - Errors & needed improvements to the man

Post by c4s »

FontRequester()

Flag parameter text:
The 'Flag' parameter isn't optional. I mean flags are always optional so it should be the same here?!

Color parameter text:
Just a small note but maybe this way it's a bit better: "You can get a valid color value with the RGB() function".
(instead of: "A valid color value you can get with the function RGB().")
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: PureBasic Docs - Errors & needed improvements to the man

Post by PB »

> this way it's a bit better: "You can get a valid color value with the RGB() function".
> (instead of: "A valid color value you can get with the function RGB().")

It looks like Yoda wrote the current version. :lol:
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
GG
Enthusiast
Enthusiast
Posts: 258
Joined: Tue Jul 26, 2005 12:02 pm
Location: Lieusaint (77), France

Re: PureBasic Docs - Errors & needed improvements to the man

Post by GG »

GG wrote:Sorry if this error is already mentioned, but for DatabaseUpdate() in chm help file (databaseupdate.html) , the example doesn't mention 2 param, only one (the db handler is ommitted).

DatabaseUpdate("UPDATE employee SET checked=1 WHERE id="+GetDatabaseString(#Database, 0))

That would be corrected as :

DatabaseUpdate(#database,"UPDATE employee SET checked=1 WHERE id="+GetDatabaseString(#Database, 0))
GG wrote:In the french .chm help file,
- AddCipherBuffer(), StartAESCipher(), GetXMLStandalone(), FinishDatabaseQuery(), AESEncoder(), FinishCipher() and AESDecoder() description are in english.
- Same thing for "Compilation d'un programme" (ide_compiler.html), from "Enable Debugger" paragraph to "constantes" paragraph.
- Same thing for "Compilation d'un programme" (ide_compiler.html), for "Constantes personnalisées" paragraph.
- In "les outils externes" (PureBasic.chm::/Reference/ide_externaltools.html), the "Enable Tool on a per-source basis" paragraph is in english.
- In "Utiliser le debugger" page (PureBasic.chm::/Reference/ide_debugger.html), the following sentence is in english : "The code view also provides the mouse-over feature from the integrated debugger to quickly view the content of a variable.".
- One paragraph for AddMailAttachment() is in english.

These small errors are still present in 4.51.
Purebasic 6.04 64 bits - Windows 11 Pro 64 bits 23H2
Christian Uceda
User
User
Posts: 67
Joined: Thu Jul 29, 2010 10:53 am

Re: PureBasic Docs - Errors & needed improvements to the man

Post by Christian Uceda »

The magic words (In the library subsystem option in the compiler options window)

UserLibThreadsafe when using third party libraries with the threadsafe compiler option

and

UserLibThreadsafeUnicode when using third party libraries using the unicode and threadsafe executable flags on the compiler.

Need to be explained on the manual.

Have a look at: http://www.purebasic.fr/english/viewtop ... 28#p333428
gnozal
PureBasic Expert
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

Post by gnozal »

Christian Uceda wrote:The magic words (In the library subsystem option in the compiler options window) UserLibThreadsafe when using third party libraries with the threadsafe compiler option and UserLibThreadsafeUnicode when using third party libraries using the unicode and threadsafe executable flags on the compiler need to be explained on the manual.
No documentation error.
These are custom subsystems, so they are not to be mentioned in the manual.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Locked