|
|
|
|
|
|
|
|
Palm programming with Quartus Forth (continued)
- penDownEvent puts the event code of a penDownEvent on the stack;
- '=' takes the top two numbers off, i.e., the event and our code, and replaces them with true or false;
- if consumes the top value. If true then "coords@ at hello" is executed, otherwise drop drops our remaining ekey off the stack.
Figure C shows HelloWorld with these events being handled.
FIGURE C
Here is HelloWorld with events.
The next step I hope in this brief introduction that I've given you a hint as to what you can do with Forth. I'd recommend you download Steve Donahue's excellent .PDF tutorial on using resources in your program as your next step.
Although I've been frustrated at times, I'm going to keep going with Forth. If nothing else, it's blown fresh air into my mind and started to loosen the ingrained habits of 15 years of programming in the mainstream.
It's not easy, though. If you're new to programming on Palm devices and new to Forth, then you're fighting on two fronts. Having said that, you might find it pays off. For instance, you can get free development systems for the Mac, Windows, and Linux platforms, so it might be the only language you need.
Product availability and resources You can visit the Quartus home page at http://www.quartus.net. Registration is $69.95 USD and comes with 60 days of technical support via email. Quartus also hosts a contributor's download section and a lively discussion area moderated by Neal Bridges, the developer.
Look in the download section at http://www.quartus.net for Tutorial 1.02, a great beginner's guide by Steven Donahue.
I bought the two books on the must read list, Starting Forth and Thinking Forth, both by Leo Brodie. ISBN 0-13-843079-9 and 0-13-917568-7 respectively. I didn't think much of Starting Forth -- it's a revamped 1983 edition and way out of touch. I'd recommend Thinking Forth though; it's a good insight into Forth design philosophy. Visit http://www.amazon.com for these titles.
If you want to see the home of all things Forth, visit http://www.forth.com. This is where Charles Moore currently hangs his hat and you can read much about the language and its history.
UK readers should go to MicroProcessor Engineering Ltd. at http://www.mpeltd.demon.co.uk/. They're Forth specialists, very friendly, and a great place for Forth books and tools.
Bulk reprints Bulk reprints of this article (in quantities of 100 or more) are available for a fee from Reprint Services, a ZATZ business partner. Contact them at reprints@zatz.com or by calling 1-800-217-7874.
|
Mark Lawson is MD of EM Connect Ltd., which specializes in collaboration and distance learning solutions. He can be reached at markl@emconnect.com.
|
|
|
|
|
|
|
|
|
|
|