PureBasic Docs - Errors & needed improvements to the man

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

Moderator: Documentation Editors

Matt
Enthusiast
Enthusiast
Posts: 447
Joined: Sat May 21, 2005 1:08 am
Location: USA

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

Post by Matt »

Will the missing examples ever be added to the manual (like Map.pb)
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2056
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

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

Post by Andre »

Matt wrote:Will the missing examples ever be added to the manual (like Map.pb)
They will :D

At least I hope so, because for all things on the ToDo list in first post the help of Fred/freak is needed.
And after so much improvements & extensions happened also to the docs of PB4.40, Fred had enough for the moment.

So please be a bit patient at the moment.

Usable example sources e.g. for the Map library should be available on the forum or the earlier posted 'v440_examples.zip' archive.
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
User avatar
Psychophanta
Addict
Addict
Posts: 4975
Joined: Wed Jun 11, 2003 9:33 pm
Location: Lípetsk, Russian Federation
Contact:

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

Post by Psychophanta »

In the Hex() for example manual wrote:
'Type' can be:
#PB_Byte : The value is a byte number, ranging from 0 to 255
#PB_Ascii : The value is a ascii character, ranging from 0 to 255
#PB_Word : The value is a word number, ranging from 0 to 65536
#PB_Unicode: The value is a unicode character, ranging from 0 to 65536
#PB_Long : The value is a long number, ranging from 0 to 4294967296
#PB_Quad : The value is a quad number, ranging from 0 to 18446744073709551615
and should be:
'Type' can be:
#PB_Byte : The value is a byte number, ranging from 0 to 255
#PB_Ascii : The value is a ascii character, ranging from 0 to 255
#PB_Word : The value is a word number, ranging from 0 to 65535
#PB_Unicode: The value is a unicode character, ranging from 0 to 65535
#PB_Long : The value is a long number, ranging from 0 to 4294967295
#PB_Quad : The value is a quad number, ranging from 0 to 18446744073709551615
or still better imo:
'Type' can be:
#PB_Byte : The value is a byte number, ranging from 0 to $FF
#PB_Ascii : The value is a ascii character, ranging from 0 to $FF
#PB_Word : The value is a word number, ranging from 0 to $FFFF
#PB_Unicode: The value is a unicode character, ranging from 0 to $FFFF
#PB_Long : The value is a long number, ranging from 0 to $FFFFFFFF
#PB_Quad : The value is a quad number, ranging from 0 to $FFFFFFFFFFFFFFFF
http://www.zeitgeistmovie.com

While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB :mrgreen:
Captn. Jinguji
User
User
Posts: 92
Joined: Sun Oct 24, 2004 9:25 am

PureBasic Docs - Errors & needed improvements to the man

Post by Captn. Jinguji »

Hi Andre.
It is only a minor thing, you decide whether it is worthwhile adding a hint to the docs:
Plz view this thread Compiler options and Create Executable
Is this an artifact or should it be disposed of ?
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 »

The Survival Guide contains some stuff on type casting and expression evaluation and migth be converted to a more official document, however the rules once sanctioned seem to be still a little broken, or I simply do not understand the new rules... Yet, it may provide a starting point, and the PB team is free to use them.
( 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
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

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

Post by Kaeru Gaman »

suggested improvement:
a little example to ResizeGadget() could show how a Gadget is moved, then it could be found with searching the Help for "move gadget"...
parallel to "windows.pb" that shows ResizeWindow and can be found via "move window".
oh... and have a nice day.
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

URGENT - IMPORTANT

Post by Kaeru Gaman »

URGENT - IMPORTANT

Help \ WindowedScreen \ Example 2
http://www.purebasic.com/documentation/ ... creen.html

Code: Select all

; we don't need exact screen width/height, because it will be automatically stretched...
this is wrong!
it's about a dozen times know I answer this question to beginners, I wrote about a dozen times in the forums that the example is wrong.

the Autostretch does not stretch a 1pix screen to a useful size, this would nit be stretching but resizing.

what the Autostretch does is stretching all given pixels to the size of the area.

in the german Help for 4.40 the coordinates are corrected to 320x200, but the misleading comment is still in it.
I would check the recent english help if I knew how to switch the Help to use in the IDE.
oh... and have a nice day.
User avatar
luis
Addict
Addict
Posts: 3876
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

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

Post by luis »

http://www.purebasic.com/documentation/ ... chive.html
(e.g. texture, mesh, sky, @link""RenderWorld" "world")
tag link malformed
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
luis
Addict
Addict
Posts: 3876
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

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

Post by luis »

In the GOTO help

"To exit a loop savely" should be "safely" I presume.


uhmmm... talking about GOTOs

maybe it would be nice to write in the help it's not safe to exit a select case using a GOTO.

If I understand correctly this code:

Code: Select all

Select a
    Case 1    
        Goto lbl_bad
    Case 2
	
    Case 3
	
EndSelect

lbl_bad:
End
compiled to this (excerpt)

Code: Select all

; PureBasic 4.40 (Windows - x86) generated code

; Select a
  PUSH   dword [v_a]
; Case 1    
  MOV    ebx,1
  CMP    ebx,[esp]
  JNE   _Case1
; Goto lbl_bad
  JMP    l_lbl_bad
; Case 2
  JMP   _EndSelect1
_Case1:
  MOV    ebx,2
  CMP    ebx,[esp]
  JNE   _Case2
; Case 3
  JMP   _EndSelect1
_Case2:
  MOV    ebx,3
  CMP    ebx,[esp]
  JNE   _Case3
; EndSelect
_Case3:
_EndSelect1:
  POP    eax
; 
; 
; lbl_bad:
l_lbl_bad:
; End
  JMP   _PB_EOP_NoValue
; 
; 
; 
_PB_EOP_NoValue:
  PUSH   dword 0
this is suggesting to me the select-case is using the stack, so a jump out of it would leave the stack unbalanced.

In that case better to resort to if-elseif-endif if one really want to use a goto for some reason.
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
luis
Addict
Addict
Posts: 3876
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

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

Post by luis »

OnErrorGoto

http://www.purebasic.com/documentation/ ... rgoto.html
It is also not save to continue
save -> safe

(hey, english is not my first language, if I correct something and it turns out to be a bestiality on my part please point that out to me and I'll keep my mouth shut in the future about these things)
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
luis
Addict
Addict
Posts: 3876
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

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

Post by luis »

ArraySize()
@arraysizereturns -1, if the array couldn't be declared (out of memory...).
Should be "ArraySize() returns -1, ..."
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
Comtois
Addict
Addict
Posts: 1429
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Texture : Supported formats

Post by Comtois »

About LoadTexture() i can read this in the doc :
Texture format can be in PNG, TGA or JPG.
In Ogre.log i can read this
Supported formats: bmp,ico,jpg,jif,jpeg,jpe,koa,iff,lbm,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,dds,gif,g3,sgi,j2k,j2c,jp2
I tested different formats (bmp, gif, png, jpg, ico), they work very well, but does that all the formats mentioned above also work with PureBasic ?

The doc should be updated according to the formats supported.
Please correct my english
http://purebasic.developpez.com/
User avatar
GG
Enthusiast
Enthusiast
Posts: 257
Joined: Tue Jul 26, 2005 12:02 pm
Location: Lieusaint (77), France

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

Post by GG »

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))
Last edited by GG on Tue Jan 05, 2010 4:41 pm, edited 1 time in total.
Purebasic 6.04 64 bits - Windows 11 Pro 64 bits 23H2
User avatar
GG
Enthusiast
Enthusiast
Posts: 257
Joined: Tue Jul 26, 2005 12:02 pm
Location: Lieusaint (77), France

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

Post by GG »

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.".
Purebasic 6.04 64 bits - Windows 11 Pro 64 bits 23H2
Little John
Addict
Addict
Posts: 4519
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

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

Post by Little John »

In PB 4.41 RC 1, in the help for WaitWindowEvent(), it reads in the example:

Code: Select all

Case #PB_Event_Gadget
  Select EventGadget()
    Case 1 : Debug "Button 1 clicked!"
    Case 2 : Debug "Button 2 clicked!"
    Case 3 : Debug "Button 3 clicked!"
  EndSelect
But in that example code, there is no "Button 3" at all. ;-)
This could be confusing for beginners.

Regards, Little John
Locked