It is currently Wed Dec 11, 2019 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, 2, 3, 4, 5, 6 ... 15  Next
Author Message
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Tue Nov 03, 2009 10:21 am 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 07, 2007 3:25 pm
Posts: 3716
Location: Berlin, Germany
nco2k wrote:
btw, why isnt there a default (.i like) type for floats? .f on 32bit and .d on 64bit.

Probably because there is only one default type at all. And that's .i, as you wrote.
And what has this got to do with the docs?

Regards, Little John

_________________
Please excuse my flawed English. My native language is PureBasic.
Search
RSBasic's backups


Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Tue Nov 03, 2009 1:02 pm 
Offline
Addict
Addict
User avatar

Joined: Mon Sep 15, 2003 5:55 am
Posts: 1341
but .i aint no float aight? :roll:

wouldnt it be easier to write:
Code:
Var.z

instead of:
Code:
CompilerIf #PB_Compiler_Processor = #PB_Processor_x64
  Var.d
CompilerElse
  Var.f
CompilerEndIf

and yes, its off-topic, thats why i will stop here.

c ya,
nco2k

_________________
If OSVersion() = #PB_OS_Windows_ME : End : EndIf


Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Tue Nov 03, 2009 3:04 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 5:21 pm
Posts: 5783
Location: Germany
> btw, why isnt there a default (.i like) type for floats? .f on 32bit and .d on 64bit. isnt .d 'faster' on 64bit?

No. Both x86 and x64 have the same floating point unit, so it makes no difference.

_________________
quidquid Latine dictum sit altum videtur


Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Tue Nov 03, 2009 3:08 pm 
Offline
Addict
Addict
User avatar

Joined: Mon Sep 15, 2003 5:55 am
Posts: 1341
ah thanks.. so it was just a rumor then. :)

c ya,
nco2k

_________________
If OSVersion() = #PB_OS_Windows_ME : End : EndIf


Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Tue Nov 03, 2009 4:16 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 07, 2007 3:25 pm
Posts: 3716
Location: Berlin, Germany
nco2k wrote:
wouldnt it be easier to write:
Code:
Var.z

instead of:
Code:
CompilerIf #PB_Compiler_Processor = #PB_Processor_x64
  Var.d
CompilerElse
  Var.f
CompilerEndIf

Now I see what you mean. It was a misunderstanding.

Regards, Little John

_________________
Please excuse my flawed English. My native language is PureBasic.
Search
RSBasic's backups


Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Fri Nov 06, 2009 4:14 pm 
Offline
Addict
Addict
User avatar

Joined: Mon Jul 25, 2005 3:51 pm
Posts: 3595
Location: Utah, USA
Update entry 'Data' to correct examples and text describing the storing of memory addresses so that they use the Integer (.i) type instead of Long (.l). This will keep things accurate for both 32-bit and 64-bit environments.

Here is some of the sample text demonstrating what needs to be changed:
Quote:
For advanced programmers: it's also possible to put a procedure address or a label address inside Data when its type is set to long (.l). This can be used to build easy virtual function tables for example.

_________________
Image


Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Sat Nov 07, 2009 6:53 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Mar 24, 2004 11:04 pm
Posts: 902
Location: Seattle, USA
Hi Andre,
Great work on the docs, I like the concise style in which they are done.

Friendly reminder:
I noticed in the latest beta 6 for 4.40 that there is still no mention in the help file of the new gradient drawing functions:
LinearGradient(), BoxedGradient(), CircularGradient(), EllipsicalGradient(), ConicalGradient()


Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Sun Nov 08, 2009 9:56 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 07, 2007 3:25 pm
Posts: 3716
Location: Berlin, Germany
Log()

Docs of PB 4.40 Beta 6 wrote:
Syntax
Result.f = Log(Number.f)

Description
Returns the Log of the Number.

A function cannot return "the Log", but only a logarithm for a particular base.

Since Log() calculates the logarithm for base e, it should read:
Returns the natural logarithm of the given number.

Regards, Little John

_________________
Please excuse my flawed English. My native language is PureBasic.
Search
RSBasic's backups


Last edited by Little John on Tue Nov 10, 2009 7:36 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Sun Nov 08, 2009 10:37 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Tue Jun 12, 2007 10:30 am
Posts: 617
Location: not there...
@LJ: Amazing, how many things you find, but much more important: I´m soooo happy you have never been a teacher of mine at school :mrgreen:

_________________
5.70


Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Sun Nov 08, 2009 10:52 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 07, 2007 3:25 pm
Posts: 3716
Location: Berlin, Germany
:D

_________________
Please excuse my flawed English. My native language is PureBasic.
Search
RSBasic's backups


Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Thu Nov 12, 2009 12:28 am 
Offline
Enthusiast
Enthusiast

Joined: Fri Feb 24, 2006 9:40 am
Posts: 314
The manpage of OSVersion() is missing "#PB_OS_Windows_7"

On a sidenote - the "About" requester of PB 4.4B6 still says "2008" at one place.


Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Mon Nov 16, 2009 7:29 am 
Offline
Enthusiast
Enthusiast

Joined: Sun Sep 17, 2006 1:24 pm
Posts: 406
Location: Germany
EventDropAction()
help wrote:
#PB_Drag_Move: The data should be moved (The drag source is responsible for removing the original data)

Shouldn't it be the drag target, that is responsible for removing the original data :?:

Otherwise, how would you signal the drag source to remove the original data or not :?:


Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Mon Nov 16, 2009 1:26 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 5:21 pm
Posts: 5783
Location: Germany
Marlin wrote:
EventDropAction()
help wrote:
#PB_Drag_Move: The data should be moved (The drag source is responsible for removing the original data)

Shouldn't it be the drag target, that is responsible for removing the original data :?:

Otherwise, how would you signal the drag source to remove the original data or not :?:


This is correct. How should the drag target be able to remove data from another program ?

The DragXXX() functions indicate to the source wether the drag succeeded or not so it can take the appropriate action.

_________________
quidquid Latine dictum sit altum videtur


Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Mon Nov 16, 2009 2:28 pm 
Offline
Enthusiast
Enthusiast

Joined: Sun Sep 17, 2006 1:24 pm
Posts: 406
Location: Germany
I'd like to use an example to get this straight:

I'm using an application with a window with a StringGadget (txtBaseDir).

Here I want an easy way to get a path to a file or folder.
Therefore I use:
Code:
EnableGadgetDrop(txtBaseDir, #PB_Drop_Files, #PB_Drag_Move)
Now I drag some folder from Konqueror onto the StringGadget.

As Konqueror is where I got the folder from, I consider it to be the source, right?

The target then would be my StringGadget.
(As it is the place I drag the folder to)

In the eventloop I evaluate a #PB_Event_GadgetDrop to my StringGadget
and execute some procedure.

In this case I do not want the folder to be deleted.
(It does not get deleted.)

But if I wanted the source file to be deleted, I would need to code the act of deletition like
Code:
DeleteFile()
somewhere in my target procedure.
As here is also the only place, where I know when I don't need the source anymore.

Quote:
I just thought of something that can probable make my point clear:
I'm using another PB application that contains file paths in a ListIconGadget.
I can drag them from there (my app being source) to the trash.
The trash now considered target.

Nowhere in this source app have I coded any deletion or such!
But files dragged from here to the trash, do get moved to the trash.

This is fact.

Unless you come up with an alternative way to define source and target,
the help text is wrong.


Top
 Profile  
 
 Post subject: Re: PureBasic Docs - Errors & needed improvements to the man
PostPosted: Mon Nov 16, 2009 2:40 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 5:21 pm
Posts: 5783
Location: Germany
Files are different because you do not drag the actual file but only the file name. So whatever is to be done to the file itself has to be done by the target (the DragFiles() help page mentions this). For all other types of content, the source is responsible for the deletion.

_________________
quidquid Latine dictum sit altum videtur


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, 2, 3, 4, 5, 6 ... 15  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 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