Page 5 of 15
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Tue Dec 01, 2009 2:59 am
by Matt
Will the missing examples ever be added to the manual (like Map.pb)
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Thu Dec 10, 2009 12:15 am
by Andre
Matt wrote:Will the missing examples ever be added to the manual (like Map.pb)
They will
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.
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Sun Dec 13, 2009 10:30 pm
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
PureBasic Docs - Errors & needed improvements to the man
Posted: Thu Dec 17, 2009 1:41 pm
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
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Thu Dec 17, 2009 3:55 pm
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.
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Sun Dec 20, 2009 2:54 am
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".
URGENT - IMPORTANT
Posted: Tue Dec 22, 2009 5:32 am
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.
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Wed Dec 30, 2009 10:53 pm
by luis
http://www.purebasic.com/documentation/ ... chive.html
(e.g. texture, mesh, sky, @link""RenderWorld" "world")
tag link malformed
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Thu Dec 31, 2009 2:26 pm
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.
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Fri Jan 01, 2010 2:50 pm
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)
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Fri Jan 01, 2010 5:24 pm
by luis
ArraySize()
@arraysizereturns -1, if the array couldn't be declared (out of memory...).
Should be "ArraySize() returns -1, ..."
Texture : Supported formats
Posted: Sat Jan 02, 2010 9:26 pm
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.
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Mon Jan 04, 2010 5:31 pm
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))
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Tue Jan 05, 2010 3:50 pm
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.".
Re: PureBasic Docs - Errors & needed improvements to the man
Posted: Tue Jan 19, 2010 8:07 pm
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