Page 2 of 3

Posted: Thu Aug 09, 2007 10:38 am
by erosolmi
Well, they must have changed habits recently because my HD has not been formatted so far, but wait ... oh no ... it is form ... att ... i ... ng ...

...---...
...---...
...---...

Posted: Thu Aug 09, 2007 10:38 am
by srod
:lol:

Posted: Thu Aug 09, 2007 1:27 pm
by pdwyer
Welcome Eros!

I don't think that this "PB" has the wrapper limitation of your last "PB"! :wink: I remember the problems you were having. PureB doesn't have that limitation in their license, I seem to remember someone here asking about it and the attitude here was more "what you do with your code is your issue".

The syntax does take a little getting used to, and some of the changes you might trip over due to some sparse docs but in the end I've found that I like PureB more over all. More features.

The string issue... PureB strings are not hi perf because they are for display and text not for data. Some of the pointer arithmatic stuff is nice in PureB though. Your sort of forced to abandon the string method of data manipulation and move to pointer manipulation but once you make that little jump you will be glad you did. Very powerful.

Looking forward to seeing you around :)

Posted: Thu Aug 09, 2007 1:55 pm
by erosolmi
Thanks Paul.
No big problem with strings. I do not use strings to store structures. Almost 90% of the work I've done is by using pointers so it is just a matter of language syntax to get used. Anyhow, so far I like it.

Regarding licence, PureBasic licence clearly state:
"All components, libraries, and binaries are copyrighted by Fantaisie Software. The PureBasic license explicitly forbids the creation of DLLs whose primary function is to serve as a 'wrapper' for PureBasic functions."
So unless an official written permission, I have to stay with this and this will not allow me to port thinBasic source from Power Basic to Pure Basic. I had already a licence problem in the past and I do not want to fall into those matters again.

For the rest, it seems quite nice so far. I'm now dealing with DLL creation. I have some problems but I will wait some days to post for help. I'm pretty sure the problem is still on my side. I need to test more and write some code from the beginning.

Ciao.
Eros

Posted: Thu Aug 09, 2007 2:02 pm
by pdwyer
:oops:
sorry for passing you the wrong advice, I thought someone asked that...

Thanks for setting me straight

Posted: Thu Aug 09, 2007 2:36 pm
by PB
> I had already a licence problem in the past and I do not want to fall into
> those matters again

This license issue has been discussed many times here. It just means you
can't wrap single, or very small, snippets of PureBasic code for export. So,
you can't create a function like this for use in a DLL:

Code: Select all

Procedure MyDeleteFile(filename$)
  DeleteFile(filename$)
EndProcedure
Because that's a blatant wrapping of the PureBasic "DeleteFile" command.

Posted: Thu Aug 09, 2007 2:44 pm
by Kaeru Gaman
"All components, libraries, and binaries are copyrighted by Fantaisie Software. The PureBasic license explicitly forbids the creation of DLLs whose primary function is to serve as a 'wrapper' for PureBasic functions."
so, if you write a game-maker that uses a script-language,
and some of the commands are just wrappers,
this will still not mean that wrapping is the primary function.

Posted: Thu Aug 09, 2007 2:47 pm
by erosolmi
PB,

yes, it is clear. I suppose also something like:
Procedure MyDeleteFile(filename$)
;---Check something on file name, for example check if file exists
DeleteFile(filename$)
;---Do something else after file has been deleted
EndProcedure
is again a wrapper. Here we go into a too much high number of possibilities to fall into a licence violation.

I have written a big interpreter called thinBasic.
You can see it at: http://www.thinBasic.com and http://community.thinbasic.com
Online documentation get be taken from: http://www.thinbasic.com/public/product ... index.html
Free download is at: http://www.thinbasic.com/modules.php?op ... dsDownload

thinBasic is too vaste (more than 1000 native commands) to go too much light on licence matters so I prefer to use PureBasic for my other programming matters other than using it for thinBasic source code porting. No problem, really. I can also perfectly understand PureBasic position on this licence indication.

Maybe I will return on this, not before some months of PureBasic study.
Thanks a lot for all indications here. This community seems very nice and tech/programming oriented. I like that.

Ciao
Eros

Posted: Thu Aug 09, 2007 2:56 pm
by PB
It's not a wrapper if your function does other things, as in your example.
After all, one of PureBasic's selling points is the creation of DLLs to use in
third-party apps, so how can this be done if you don't use ANY PureBasic
commands in the procedures? :)

Posted: Thu Aug 09, 2007 2:57 pm
by pdwyer
Maybe just tell Fred what you are doing and let him answer. :)

Posted: Thu Aug 09, 2007 3:20 pm
by erosolmi
PB wrote:It's not a wrapper if your function does other things, as in your example.
After all, one of PureBasic's selling points is the creation of DLLs to use in
third-party apps, so how can this be done if you don't use ANY PureBasic
commands in the procedures? :)
For PowerBasic owner also that functions were wrappers. Just adding few lines of code around a unique compiler feature was considered a wrapper.
But I do not want here to go too much on this, if possible. Maybe it is not the right time also because I really need to spend time on learning PureBasic.

In any case, thanks.
Eros

Posted: Thu Aug 09, 2007 3:48 pm
by dontmailme
If you want to convert your app to Pb, just check with Fred and he can clear up any issues..... ;)

Anyway.... Welcome to the PB community!

There are some very knowledgeable guys here, so don't be afraid to ask anything :D

Posted: Thu Aug 09, 2007 4:19 pm
by JCV
Welcome! 8)

Posted: Thu Aug 09, 2007 4:33 pm
by ts-soft
Welcome, and thinBASIC is a nice language!

Posted: Thu Aug 09, 2007 8:51 pm
by Flype
erosolmi wrote:
PB wrote:It's not a wrapper if your function does other things, as in your example.
After all, one of PureBasic's selling points is the creation of DLLs to use in
third-party apps, so how can this be done if you don't use ANY PureBasic
commands in the procedures? :)
For PowerBasic owner also that functions were wrappers. Just adding few lines of code around a unique compiler feature was considered a wrapper.
But I do not want here to go too much on this, if possible. Maybe it is not the right time also because I really need to spend time on learning PureBasic.

In any case, thanks.
Eros
Hi,

PureBasic itself has many commands that are just wrapping Win32/API functions. For example, OpenFile() is wrapping CreateFile() of the Kernel32.dll (at least, on Windows), with some code before, and some code after.