Journey into SuperWaba

Ever wonder what it takes to write programs for your PDA? I did, and so now I am beginning a journey to try my hand at writing something for the PalmOS. SuperWaba, a variation of Java for the PDA, is my language of choice. And I'm a novice, which makes it all the more unpredictable. Hope you'll come along for the ride! Note: You can read multiple posts on one page if you click on an archive link.

Saturday, August 07, 2004

OffTopic: iziBasic

I was a bit frustrated the other day at the amount of time it's taking me to get going with SuperWaba. I'm making progress, so it's okay, but it seems like a lot of work just to get going.

As a diversion, since I have written console-style BASIC programs in the past, I thought I'd give iziBasic a try. I read through the simple manual and wrote a simple Hello World program that loops a few times and prints out "Hello World", then waits for you to tap a button to end. What is here in this post is an adaption of some info I posted previously to a developers forum. (A nice Palm site to visit!)

All this took me about an hour to prepare and about 20 mins to write that first program and get it running (which I did while waiting at a doctor's office!) Couldn't have done that with SuperWaba. One of the reasons I could do that was iziBasic is an on-board compiler, and I had the manual and sample code on there for reference as well as the editor and compiler for the actual programming. You just edit a memo document or an uncompressed/unencrypted DOC file, and then you can compile and run the program. Works great!

A few things to note though:
1) It's much more simple and limited that SuperWaba, so it may be easy to get started, but you just can't do as much.
2) The free version is nice, but has some small limitations. First it uses a standard about screen saying it's written in iziBasic. Second, a few instructions are not available. I don't know which ones. The good thing is that it should give you time to make a real good trial before you have to pay. But if it works out that you'll use it, I hope you'll register and contribute to support the author.
3) The math parser is limited, so it does operations left to right instead of by arithmetic priority.
4) The language is simple and is a one-pass compiler, so there are some limitations as expected.

But the great thing is that it's easy, you can program on-board, it can be either console-based or use some simple GUI, and it compiles into a .prc program. I think this might be a good choice for the novice programmer trying to get started programming on a Palm PDA.

One more note. You have to name the source file appropriately for the compiler to find it. It can either be a memo or an uncompressed/unencrypted DOC file, but it MUST end with .ibas or it won't realize it's there. That's not in the documentation so it's a bit confusing.

All in all, this looks pretty promising.

Some new information:
* The parsing is very simple-minded, so you need to put line breaks at exactly the right place.
* You also need to assign values to variables a lot. For example, you can't do "IF a> b-c THEN..." Instead you have to set d=b-c and then to "IF a>d THEN...". Another example is that you can't do "A=MESSAGEBOX("This is the message.",1). Instead you have to do B$ = "This is the message." and then A=MESSAGEBOX(B$,1). In other words, many parameters must just be the variable, not a literal or a calculation.
* Variable names for strings and numbers are one letter only (so there are only 26 of each, and you cannot use multiple letter names. This means you have to write a list of variable names and their meaning to keep track. That's not very easy to do when you're programming on-board the Palm. This limitation is the only really serious one I see in iziBasic.) And there is only one array for strings and one for numbers. The first 26 values of the index in an array correspond to the variables A$-Z$ or A-Z, so if you want a bigger array, you put a DIM statement at the beginning of the program, and use the values bigger than 26. Yuk!

This is not enough for me to say iziBasic is no good. Actually it is pretty good except for the variable name limitations. It's an on-board BASIC, it does simple GUI, and it compiles to a runtime program file. For that maybe I'm willing to put up with some minor limitations in the parser.

If you are using iziBasic, let me know what you think, and what you're using it for!


Anonymous Anonymous said...

Great site and topic. You may want to check out PocketC ( or NSBasic Palm ( if you are looking for development languages on the Palm itself. For something more exotic try out FORTH ( -- highly recommended, but tought to get into, and there is a Pascal that runs on the Palm, but I don't have a URL handy.) Cheers and keep up the good work.

9:53 PM  

Post a Comment

<< Home