It is currently Sat Apr 04, 2020 3:04 pm

All times are UTC + 1 hour




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 224 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8, 9 ... 15  Next
Author Message
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Wed Feb 10, 2010 11:12 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 6:14 pm
Posts: 1782
Location: Germany (Saxony, Deutscheinsiedel)
Psychophanta wrote:
In the Hex() for example manual wrote:
Quote:
'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:
Quote:
'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:
Quote:
'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


I tried today following code:
Code:
Debug $FF                 ; will give 255
Debug $FFFF               ; will give 65535
Debug $FFFFFFFF           ; will give 4294967295
Debug $FFFFFFFFFFFFFFFF   ; will give -1

Is the last one right?
Can anyone also proof the other decimal values?

When all this things are clear, I will add the (corrected!?) decimal values + additional the hexadecimal values to the help... :)

_________________
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)


Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Wed Feb 10, 2010 11:14 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 6:14 pm
Posts: 1782
Location: Germany (Saxony, Deutscheinsiedel)
Captn. Jinguji wrote:
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


blueznl wrote:
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.


Comtois wrote:
About LoadTexture() i can read this in the doc :
Quote:
Texture format can be in PNG, TGA or JPG.


In Ogre.log i can read this
Quote:
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.



All suggestions added to the 'ToDo' list in first post, so Fred / Timo can check and correct the manual if needed.

Have revised the 'ToDo' list today - see first post in this thread!

_________________
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)


Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Wed Feb 10, 2010 11:28 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 6:14 pm
Posts: 1782
Location: Germany (Saxony, Deutscheinsiedel)
Kaeru Gaman wrote:
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".

Added a example line of code + additional comment about moving the gadget... :D

Kaeru Gaman wrote:
Help \ WindowedScreen \ Example 2
http://www.purebasic.com/documentation/ ... creen.html
Quote:
Code:
; 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.

....

in the german Help for 4.40 the coordinates are corrected to 320x200, but the misleading comment is still in it.

Misleading comment removed.

luis wrote:
http://www.purebasic.com/documentation/engine3d/add3darchive.html

Quote:
(e.g. texture, mesh, sky, @link""RenderWorld" "world")


tag link malformed

Fixed.

luis wrote:
In the GOTO help

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


maybe it would be nice to write in the help it's not safe to exit a select case using a GOTO.
...
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.

Fixed the spelling error.
The other suggestion about the needed 'Note' I've set on ToDo list, so Fred / Timo can check.

luis wrote:
OnErrorGoto
http://www.purebasic.com/documentation/ ... rgoto.html

Quote:
It is also not save to continue


save -> safe

Fixed.

luis wrote:
ArraySize()

Quote:
@arraysizereturns -1, if the array couldn't be declared (out of memory...).


Should be "ArraySize() returns -1, ..."

Fixed.

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).
.... corrected as :
DatabaseUpdate(#database,"UPDATE employee SET checked=1 WHERE id="+GetDatabaseString(#Database, 0))

This error shouldn't be existing anymore, at least with PB4.41 docs. Could you check?

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

Code:
    Case 3 : Debug "Button 3 clicked!"


Removed this misleading line from example code.

_________________
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)


Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Wed Feb 10, 2010 11:39 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Mar 19, 2006 1:57 pm
Posts: 4828
Location: Germany
Andre wrote:
Is the last one right?

yes it is, because PB only knows signed variables.
since there is no bigger container (yet), PB can only debug Quads.
any smaller value can be displayed seemingly unsigned, because it displays the Quad-Container.

Andre wrote:
Added a example line of code + additional comment about moving the gadget... :D

glad I was able to help. :D

Andre wrote:
Misleading comment removed.

thanx. sorry I wasn't ready to provide other examples yet....

_________________
oh... and have a nice day.


Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Thu Feb 11, 2010 12:40 am 
Offline
Addict
Addict
User avatar

Joined: Mon Jul 25, 2005 3:51 pm
Posts: 3649
Location: Utah, USA
Kaeru Gaman wrote:
Andre wrote:
Is the last one right?

yes it is, because PB only knows signed variables.
since there is no bigger container (yet), PB can only debug Quads.
any smaller value can be displayed seemingly unsigned, because it displays the Quad-Container.


Another way to verify value range for Hex numbers:

Code:
Debug StrU($FFFFFFFFFFFFFFFF) ; =18446744073709551615

_________________
Image


Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Sun Feb 14, 2010 4:39 pm 
Offline
Addict
Addict
User avatar

Joined: Mon Jul 25, 2005 3:51 pm
Posts: 3649
Location: Utah, USA
In the manual under the topic of "Variables, Types and Operators" it lists the operator priorities.

Missing from this list is the priority of the sign operator "-". An old bug report refers to it here.

_________________
Image


Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Sun Feb 14, 2010 4:45 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 14015
Location: France
It's added.


Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Sun Feb 14, 2010 4:57 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 3235
Location: Boston, MA
Hi,
Please add OS specific functions...
Some undocumented Windows Only examples:
EventwParam()
EventlParam()
If they are to be deprecated, then say that in the manual!
Example code is for teaching, and some forum code contains these functions.
Are there more?

Thanks,
Steve


Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Mon Feb 15, 2010 8:59 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 31, 2005 11:09 pm
Posts: 3695
Location: Italy
AddMapElement()

Quote:
Note: This function isn't mandatory when dealing with maps, as elements are automatically added when affecting a value to them

Affecting ? Maybe should be "assigning" ? Or "storing a value into them" ?


Maps - Overview

Quote:
You can add as many elements as you want (or as many as will fit into the memory of your computer), and accessing it back using a key.

Maybe "access them back" ?

_________________
[ My little PureBasic review ]


Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Tue Feb 23, 2010 11:12 am 
Offline
Moderator
Moderator
User avatar

Joined: Sat Apr 26, 2003 1:11 am
Posts: 1393
Intellisent for CreateCamera Command is wrong,
its 'percent' instead of french 'pourcents'

_________________
SPAMINATOR NR.1


Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Sat Feb 27, 2010 4:33 pm 
Offline
Addict
Addict
User avatar

Joined: Mon May 26, 2003 3:07 pm
Posts: 1477
Location: Nantes
Point
Note : this command will return a 32bit RGBA value only if the one of following drawing modes is enabled :
#PB_2DDrawing_AlphaClip
#PB_2DDrawing_AlphaChannel
#PB_2DDrawing_AlphaBlend

Code:
If CreateImage(0, 200, 200, 32)
   StartDrawing(ImageOutput(0))
      DrawingMode(#PB_2DDrawing_AlphaChannel)
      Box(0, 0, 200, 200, 0)
      DrawingMode(#PB_2DDrawing_AlphaBlend)
      Box(0, 0, 200, 200, RGBA($FF, $EE, $DD, $20))
   StopDrawing()
EndIf

StartDrawing(ImageOutput(0))
   ;return 24 bits value
   Debug Hex(Point(1, 1))
   
   ;return 32 bits value
   DrawingMode(#PB_2DDrawing_AlphaBlend)
   Debug Hex(Point(1, 1))
StopDrawing()

_________________
Imagewin8.1 x64 5.31 | IDE | PB plugin | Tools | Sprite | JSON | visual tool


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 03, 2010 5:39 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Mar 19, 2006 1:57 pm
Posts: 4828
Location: Germany
ATAN - Context

Statusbar-Help wrote:
ATan(Angle) Returns the Arc-Tangent of the specified angle, in radian.

this is wrong. not the Parameter is an Angle, but the Result is.

Returns the arc-tangent of the specified value. Value.f can be any value, the result will be in radians.

better, since not wrong, yet not perfect.

the Arcus-Tangens returns the Angle to a given Tangens.
It's the inverse function of tangens.

the tangens is the quotient of cathetus and anticathetus (opposite leg).
the arcustangens is the angle of this corner.

_________________
oh... and have a nice day.


Top
 Profile  
 
 Post subject: OpenScreen()
PostPosted: Sat Mar 13, 2010 11:43 am 
Offline
Addict
Addict
User avatar

Joined: Sun Mar 19, 2006 1:57 pm
Posts: 4828
Location: Germany
OpenScreen()
http://www.purebasic.com/documentation/ ... creen.html

Quote:
Width and Height should be standard combinations: 640*480, 800*600, 1024*768...


not quite correct. maybe better:
Quote:
Width and Height have to make up a supported resolution. The combination of Width, Height, Depth and RefreshRate is called a ScreenMode.
The ScreenModes the Hardware supports can be found out using ->ExamineScreenModes().


... or something like that. English is not my native language...

_________________
oh... and have a nice day.


Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Thu Mar 18, 2010 8:52 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Thu Jun 26, 2003 2:09 am
Posts: 744
Location: Spain (Galicia)
Hi Andre:
Sprite3D
http://www.purebasic.com/documentation/Examples/Sprite3D.pb.html
the line
Code:
  LoadSprite(0, "Data/Geebee2.bmp", #PB_Sprite_Texture)

should be replaced for
Code:
   LoadSprite(0, #PB_Compiler_Home+"\Examples\Sources\Data\GeeBee2.bmp", #PB_Sprite_Texture)

Cheers


Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Sun Mar 21, 2010 6:30 pm 
Offline
User
User
User avatar

Joined: Sun Mar 21, 2010 6:59 am
Posts: 35
Location: Denmark
Pressing F1 over UseFLACSoundDecoder() in PB IDE gives (in both x86 & x64):
Quote:
This program cannot display the webpage

However, the help entry can be manualy selected in the help file.

_________________
AMD FX-8350 @ ~4.8GHz | 8GB Corsair DDR3-SDRAM @ 1800Mhz | 7even Ult & Manjaro 0.8.7.1 | PB 5.3
Web: rudz.dk


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 224 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8, 9 ... 15  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye