Pre-purchasing question on string handling

Everything else that doesn't fall into one of the other PB categories.
erosolmi
User
User
Posts: 19
Joined: Wed Aug 08, 2007 4:05 pm
Location: Milan - Italy
Contact:

Post 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 ...

...---...
...---...
...---...
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

:lol:
I may look like a mule, but I'm not a complete ass.
User avatar
pdwyer
Addict
Addict
Posts: 2813
Joined: Tue May 08, 2007 1:27 pm
Location: Chiba, Japan

Post 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 :)
Paul Dwyer

“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
erosolmi
User
User
Posts: 19
Joined: Wed Aug 08, 2007 4:05 pm
Location: Milan - Italy
Contact:

Post 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
User avatar
pdwyer
Addict
Addict
Posts: 2813
Joined: Tue May 08, 2007 1:27 pm
Location: Chiba, Japan

Post by pdwyer »

:oops:
sorry for passing you the wrong advice, I thought someone asked that...

Thanks for setting me straight
Paul Dwyer

“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post 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.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post 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.
oh... and have a nice day.
erosolmi
User
User
Posts: 19
Joined: Wed Aug 08, 2007 4:05 pm
Location: Milan - Italy
Contact:

Post 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
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post 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? :)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
pdwyer
Addict
Addict
Posts: 2813
Joined: Tue May 08, 2007 1:27 pm
Location: Chiba, Japan

Post by pdwyer »

Maybe just tell Fred what you are doing and let him answer. :)
Paul Dwyer

“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
erosolmi
User
User
Posts: 19
Joined: Wed Aug 08, 2007 4:05 pm
Location: Milan - Italy
Contact:

Post 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
dontmailme
Enthusiast
Enthusiast
Posts: 537
Joined: Wed Oct 29, 2003 10:35 am

Post 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
Paid up PB User !
JCV
Enthusiast
Enthusiast
Posts: 580
Joined: Fri Jun 30, 2006 4:30 pm
Location: Philippines

Post by JCV »

Welcome! 8)

[Registered PB User since 2006]
[PureBasic 6.20][SpiderBasic 2.2]
[RP4 x64][Win 11 x64][Ubuntu x64]
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Welcome, and thinBASIC is a nice language!
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post 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.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
Post Reply