|
- Forum - iziBasic
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257
Topic # 1340 |
Program conversion from HotPaw |
06/01/2006 @ 19:12 by Tony
|
I am very new to isiBasic. I would like to convert a 47k program :-O from Hotpaw basic into iziBasic. Anyone have any recommendations to make things easier for me?
Thanks!
-Tony |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 1 -------- 06/01/2006 @ 23:05 by aldweb
visitor |
Hello Tony,
Sorry, I cannot because I do not know much of Hotpaw. It is not in my habbits to study iziBasic's "friendly competitors"
Cheers
@+ aldweb |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 2 -------- 07/01/2006 @ 01:35 by Tony
visitor |
Ha ha ha. I completely understand.
I was just hoping beyond all hope that someone might give me a small list of the main differences between the two languages, or at least tips on what kinds of things to be aware of.
Say, maybe I will put together a tip sheet when I am done!
Thanks for the quick response, and here's to hoping that iziBasic does everything I hope it does for me!
Keep up the great work...
|
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 3 -------- 07/01/2006 @ 02:05 by Ktimaster
visitor |
Well first of all HAPPY NEW YEARS
Now post the source here of the application and mabey Myself and some other developers can disect the code to come up with an iziBasic application. After all HotpawBasic is 100 times more limited then iziBasic becuase of the larger ammount of functions, PP addons and the Great Customer Support By the Developer and Users, After all isnt this a BIG Family...
BTW Aldweb... I am still working on the scripting Language... It may be the first program to update "Over-The-Air" Complements of another Project I am working on... (I am doing like 30 now) |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 4 -------- 07/01/2006 @ 13:09 by aldweb
visitor |
Say, maybe I will put together a tip sheet when I am done!
That would be a great contribution to the iziBasic project.
Cheers
@+ aldweb |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 5 -------- 08/01/2006 @ 00:09 by Ktimaster
visitor |
My thoughts exactly |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 6 -------- 08/01/2006 @ 08:59 by Tony
visitor |
Happy New Year to you too!
You guys would really be willing to take a look at over 2500 lines of code for me??
I started the conversion and am taking notes for you guys since you liked the idea. However, a couple of questions came up.
First, where are READ/DATA commands used to add data into the code and then read them into variables? My program makes extensive use of them to position buttons and gadgets on the screen. I suppose I can come up with a workaround using an external data file, or parsing large strings of numbers. But I don't want to have more than one final file, and parsing that much data can be a pain. Aldweb, why weren't these commands included?
Also, speaking of strings of numbers, in iziBasic bitmaps can be placed directly in the code as strings of numbers and then drawn on the screen in this fashion:
bbt$(0)="3FC0387FE07C80E07C3E50D67F11FFFFE1FF0020D6F3A010" bbt$(1)="B6D03804107C0010481C30503E20887F40840840849CC084" bbt$(2)="DD80847F21C83E732888EF90C1CFD0E39FE07F3FE03E7FC0" dr aw x,y,24,24,100,bbt$(0)
I would like to continue to use these same bitmap graphics, how do I go about using their raw numbers to do the same thing with iziBasic?
Hmmmm, I am starting to think maybe I should post this big program here since the more I get into this conversion the questions are gonna pop up I think, I hope you guys are patient with me! |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 7 -------- 08/01/2006 @ 09:03 by Tony
visitor |
Sorry, in that last message I meant to say: "in Hotpaw bitmaps can be placed directly..." |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 8 -------- 08/01/2006 @ 15:23 by aldweb
visitor |
Hello Tony,
READ/DATA commands are not implemented in iziBasic, even though they are Basic standards... because I don't like them at all. Same thing with this kind of bitmaps, the Basic way, let's say. Why this? Because I believe that mixing data and source code is not a clean way of working.
iziBasic rather works with the very useful management of Palm OS resources.
For bitmaps, that is design the bitmap as a resource (using BIRD or RsrcEdit) and just draw it. It is much easier to design a bitmap graphically and just ask to draw it rather than to save its pixels definitions!
READ/DATA can also be made in an easy and structured way, with string resources that just need to be retrieved. I wrote a PP applet to manage especially these kinds of resources before Christmas, I just did not publish it yet. Ktimaster is testing it I could send it to you if you wish.
Cheers, aldweb
@+ aldweb |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 9 -------- 08/01/2006 @ 20:03 by Tony
visitor |
Aldweb, let me just start by saying how impressed I am with your quick responses. It's a rare treat to have the actual developer of a program as available as you are. Thanks!
Since the program is so large I want to change as little as possible and as painlessly as possible. With that in mind I am planning on converting the READ/DATA statements using the WORD$ function that I was happy to find in iziBasic. Here is an example of what I have in mind. 'ORIGINAL READ/DATA METHOD: ‘Get cursor x y positions data 14,1,15,2,22,1,23,2,24,3,25,4 data 16,3,17,4,26,5,27,6,28,7,29,8 data 18,1,19,2,30,1,31,2,32,3,33,4 data 20,3,21,4,34,5,35,6,36,7,37,8 for j=1 to 4 for i=1 to 6 read cp(i,j,1) read cp(i,j,2) next i next j
'NEW WORD$ METHOD: ‘Get cursor x y positions d$(1)='14,1,15,2,22,1,23,2,24,3,25,4' d$(2)=‘16,3,17,4,26,5,27,6,28,7,29,8' d$(3)=‘18,1,19,2,30,1,31,2,32,3,33,4' d$(4)=‘20,3,21,4,34,5,35,6,36,7,37,8' for j=1 to 4 for i=1 to 6 x=I*2-1 : y = I*2 cp(i,j,1)=val(word$(d$(j),x)) cp(i,j,2)=val(word$(d$(j),y)) next i next j
Please let me know if the above iziBasic syntax is incorrect. You will note that I calculated the x/y data locations outside the WORD$ function because I didn't know if I can do them within the WORD$ function itself. As far the the bitmaps go, it seems like you are suggestion that I redraw all my graphics again from scratch using using BIRD or RsrcEdit. That would not be my first choice. That's why I was hoping I could somehow use the raw value for the bitmaps that I already have. Barring that, is there a way I could cut and paste the already drawn images into BIRD or RsrcEdit?
Thanks again for your patient attention to all this!
|
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 10 -------- 08/01/2006 @ 22:06 by aldweb
visitor |
Tony,
iziBasic is a hobby project for me, so it is my pleasure to try to help users
For bitmaps, you could also work your way, drawing each single point from the stored hexadecimal values, this will just be slow...
As for your way of working to simulate read/data, it is a very smart way. Just be careful that there are only 2 arrays in iziBasic, A() and A$(), but the great thing about them is that they can address the whole numbers and text stacks, so all variables. So, you will have to manage the indexes of your cp() array to have them fit in A() and your d$() array in A$(). Give a look to the Dim2 sample source code to see how to deal with that.
Cheers
@+ aldweb |
|
|
topic active
topic closed
Sticky
New message -
Correct message
Close topic
Make sticky
|
|