PureBasic Docs - Errors & needed improvements to the man

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

Moderator: Documentation Editors

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 »

Kaeru Gaman wrote:
Melissa wrote:
Seymour Clufley wrote:
Melissa wrote:
It's recommended to get a slightly larger buffer, like 30% smaller to avoid overflows.
Fail, it should be 25% smaller.
Surely 25% larger?
No, read harder.
think!

... how can you avoid an overflow by using a smaller buffer?
... if only a smaller buffer was needed, how can using a bigger buffer produce an overflow?

surely, it should read "like 30% larger"
@Kaeru: the original poster left off a few important words. The quote from the help file is from the entry for Base64Decoder().

If one is using Base64Encoder() the buffer is larger, but if one is using Base64Decoder() the buffer is smaller It would appear that the entry in the manual for Base64Decoder() duplicated portions of the entry for Base64Encoder() but failed to adjust (i.e. replace 'larger' with 'smaller') it to match.

Since the original post four days ago, most of that has been corrected in the help file (though it still says 'overflows' which doesn't make since when it recommends a smaller buffer). The poster still thinks that the precision of the percentage difference of the buffers needs to be adjusted from 30-33% to 25%.


I am in agreement that the language should be adjusted. I'm not concerned about the percentage. :wink:
infratec
Always Here
Always Here
Posts: 6874
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

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

Post by infratec »

- Added graphical console functions to linux
If you mean

Code: Select all

EnableGraphicalConsole()
ConsoleLocate()
than you should add Linux to the 'Supported OS' in the helpfile.
Seymour Clufley
Addict
Addict
Posts: 1233
Joined: Wed Feb 28, 2007 9:13 am
Location: London

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

Post by Seymour Clufley »

The help now has a specific section on Arrays.

IMHO it would be good to have a similar section for structures, then the structure commands could be taken out of the Compiler Functions section - I don't understand why they are in that section.
JACK WEBB: "Coding in C is like sculpting a statue using only sandpaper. You can do it, but the result wouldn't be any better. So why bother? Just use the right tools and get the job done."
User avatar
skywalk
Addict
Addict
Posts: 3999
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

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

Post by skywalk »

Result = LoadImage(#Image, Filename$ [, Flags])

Help makes no mention of Flags to use?

Thanks,
Steve
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
skywalk
Addict
Addict
Posts: 3999
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

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

Post by skywalk »

Hi,
I was looking for the VB6 equivalent of a Label that can have its text aligned and receive events.
The manual needs updating here...
Please add the mixing of String and Text Gadget Flags to create a ReadOnly StringGadget that has centered text and can trigger an event, unlike the TextGadget.

Code: Select all

If OpenWindow(0, 0, 0, 322, 220, "StringGadget - Centered & ReadOnly", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)  
    StringGadget(5,10,55,75,24,"string5",#PB_Text_Center|#PB_String_ReadOnly)
    StringGadget(6,10,95,75,24,"string6",#PB_Text_Right|#PB_String_ReadOnly)
    TextGadget  (7,10,120,75,24,"text7",#PB_Text_Right|#PB_Text_Border)
    StringGadget(8,10,155,75,24,"string8",#PB_Text_Center|#PB_String_ReadOnly|#PB_Text_Border)  ;<--- However, this actually removes the border.
      Repeat
        If EventGadget() = 5
          If EventType() = #PB_EventType_Focus
            Debug "Focus on StringGadget #5"
          EndIf
        EndIf
      Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf
'Flags' are always optional and can be composed (using the '|' OR operator) of one of the following constants:
#PB_String_Numeric : Only (positive) integer numbers are accepted.
#PB_String_Password : Password mode, displaying only '*' instead of normal characters.
#PB_String_ReadOnly : Read only mode. No text can be entered.
#PB_String_LowerCase : All characters are converted to lower case automatically.
#PB_String_UpperCase : All characters are converted to upper case automatically.
#PB_String_BorderLess : No borders are drawn around the gadget.

#PB_Text_Center : The text is centered in the gadget.
#PB_Text_Right : The text is right aligned.
#PB_Text_Border : A sunken border is drawn around the gadget. ;<--- However, this removes the border in a StringGadget.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
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 »

Just a small typo - but still not fully unseeable :wink:
Examples/PopupMenu.pb.html wrote:The indent is important here for a good lisibility
-> The indent is important here for a good visibility.

greetings ~ Vera
User avatar
zxtunes.com
Enthusiast
Enthusiast
Posts: 375
Joined: Wed Apr 23, 2008 7:51 am
Location: Saint-Petersburg, Russia
Contact:

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

Post by zxtunes.com »

I have written the utility which checks links to pages in HELP and have found an error in a file
"pbconstants.html" - <a href =./gadget/.html> Gadget </a>
^^^
and

<a href=../xml/.html>XML</a>



other bugs:

page SortStructuredList():
"<a href=../reference/linkedlist.html>list</a>" - "linkedlist.html" file no exist

and

page AbortFTPFile():
"<a href="receiveftpfi.html">" - "receiveftpfi.html file no exist and
...<a href="sendftpfi.html">SendFTPFile</a>

and

page Array have:
"<a href="../Examples/Array.pb.html">Array.pb</a>" - file no exist

and

page Map: not found "Map.pb"

and

page Sort: not found "Sort (Numeric).pb" & "Sort (String).pb"


Fixed please.
User avatar
zxtunes.com
Enthusiast
Enthusiast
Posts: 375
Joined: Wed Apr 23, 2008 7:51 am
Location: Saint-Petersburg, Russia
Contact:

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

Post by zxtunes.com »

and BoxedGradient() have strange line "@newline"...
User avatar
zxtunes.com
Enthusiast
Enthusiast
Posts: 375
Joined: Wed Apr 23, 2008 7:51 am
Location: Saint-Petersburg, Russia
Contact:

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

Post by zxtunes.com »

and ";-------------------------------------------------------------------------------------------------------- " trash in "Clipboard"
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

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

Post by Trond »

- Typing ArraySize() and pressing F1 leads to the wrong manual page (Array instead of ArraySize()).
- #PB_GadgetType_Shortcut is missing.
User avatar
Arctic Fox
Enthusiast
Enthusiast
Posts: 609
Joined: Sun Dec 21, 2008 5:02 pm
Location: Aarhus, Denmark

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

Post by Arctic Fox »

The help says that ATan2(x, y) is calculated as ATan(x/y) - I am very sure that it is ATan(y/x), y over x.

Code: Select all

Debug ATan2(8, 10)
Debug ATan(8 / 10)
Debug ATan(10 / 8)
User avatar
zxtunes.com
Enthusiast
Enthusiast
Posts: 375
Joined: Wed Apr 23, 2008 7:51 am
Location: Saint-Petersburg, Russia
Contact:

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

Post by zxtunes.com »

English HELP:

WebGadget:

Code: Select all

#PB_Web_ScrollX       : Get the horizontal scrolling position.
#PB_Web_ScrollYґ 
^^ Bug symbol

[done]
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

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

Post by Trond »

F1 on NextElement() in the IDE opens a "This program cannot display the webpage" page. 4.50 RC 1.
User avatar
skywalk
Addict
Addict
Posts: 3999
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

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

Post by skywalk »

Please explain ByRef handling of string variables in the Manual!

I was annoyed / stumped by the ByRef behavior for Strings in PureBasic.
From searching forum and trying different approaches, there are several ways:

http://www.purebasic.fr/english/viewtop ... 27#p327127
Last edited by skywalk on Tue Jun 22, 2010 3:40 pm, edited 1 time in total.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
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() 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.".


These small errors are still present in 4.50.
Purebasic 6.04 64 bits - Windows 11 Pro 64 bits 23H2
Locked