PDA

View Full Version : conversions



kryton9
21-02-2008, 22:57
Guys, sorry with my studies in c++ land I have not been active in thinbasic or powerbasic or any other language as to keep my thoughts straight. But I can see that although I have a shallow understanding of c++ and have had for c for years, to learn it in the depth I am trying is going to take quite some time.

Anyways in the meantime, I had a thought. As a break this is something I could do to still be involved and contribute. As you guys who use powerbasic know, Jose Roca has done and continues to do an incredible job in porting libraries into powerbasic. I was thinking, I could start to port his ports to thinBasic. It would be good exercise I think to keep me fresh on both languages this way.

Is there a list of preference on what to port first to help thinBasic be even more super? I would do just ports and not write wrapper commands so once I get things figured out it should go pretty quickly I would think?

ErosOlmi
21-02-2008, 23:03
Why don't you make a little thinBasic module using Power Basic?
If you choose an argument, an area where to deal, and decide, let's say, 2/3 thinBasic keywords you would like to create, I can help you starting.

Of course if you like this idea.

Ciao
Eros

kryton9
21-02-2008, 23:30
Thanks Eros for offer of help. I will try to pick a library and see where it takes me. I was thinking of sqlite. What do you think?

ErosOlmi
21-02-2008, 23:52
Can be a good start. I do not know it in details but we can arrange.
Maybe you can start using it as external lib using a declaration file.
If you find a Power Basic include file with functions and equates, it can be quite easy to port into thinBasic. Declares in thinBasic and Power Basic are almost identical. The same for equates.

kryton9
22-02-2008, 00:14
Eros, I downloaded and looked at the sqlite include file that Jose made. It looks like I can use it as is, except for perhaps commenting out some directives.
I will see if I can write an example script. If so then I will work on help for this library.

kryton9
22-02-2008, 06:10
Jose's include file so far is working perfectly in thinBasic.

I can now insert records into an existing database and table. Now I need to figure out how to use the callback function or some of the other commands in sqlite. But at least I got a start :)

Once I get something usable I will post of course examples and necessary files.

ErosOlmi
22-02-2008, 08:35
Ken,

callbacks are impossible in thinBasic script language.
If callbacks are mandotory to interface with sqlite, than the only way is to write a compiled thinBasic module in Power Basic or other compiled language.

Sorry
Eros

kryton9
22-02-2008, 17:30
To tell you the truth, I don't know the answer Eros. It is called a callback function and used with other commands for stepping through sqlite query results.
I will learn more as I read up on it. Thanks for the heads up. I guess if it doesn't work then I will know why :)

kryton9
22-02-2008, 18:39
I can see now I am not going to be able to do this. I just can't concentrate and keep things straight in my head that well anymore to do things like this it seems.
I will go back to my studies and realize my contributions will have to come in other ways. Sorry about that.

ErosOlmi
22-02-2008, 18:43
No problem Ken.
Do things you prefer and when you think it is the right time.

Have nice time. I'm already 100% happy you are with us ;)
Eros