6
Overview
©2000-2008 Tibbo Technology Inc.
calculations. Most other BASIC versions, by default, operate using floating point
arithmetic, but these are not usually useful to embedded control (and even get in
the way). Another decision was to use a static memory model for procedure
variables. Memory is not allocated and deallocated dynamically -- It is assigned on
compile-time, which results in great performance improvements.
Principle Five: No B.S
... that is, no babysitting. Development systems intended for rapid application
development on the PC will often try to handle every little error or problem the
programmer may encounter. If a variable overflows, for example, they will halt
execution and pop up an error to let him know. This makes sense for a PC-based
product, because you are right there to see it halt.
However, when you are creating an embedded system, you expect it to run at all
times, without halting. Nobody will be there to see any errors and babysit your
system. Your device is simply expected to work.
This is a major difference also for the development process. In essence, since the
whole language is built this way, you will also get much less errors even when
doing seemingly 'strange' things, such as putting large values into variables that
cannot hold them. The language will deal with it silently, in a very predictable and
logical way -- but will not pop up an error.
Principle Six: Event-Driven Programming
Users of VB and Delphi and other Windows-based tools will find this principle
familiar. However, if most of your experience with BASIC was under DOS, you
might find this slightly odd. Under DOS, you would expect a program to begin from
the beginning, then continue and stop. They execute from top to bottom. This may
be called linear execution.
For Tibbo Basic, this is not the case. The programs you will write will be event-
driven. Your program will consist of a number of event handlers which will be fired
(invoked) in response to specific things which happen to your system in real life. If
your platform was a fridge, you might want to write a handler for a 'door opening'
event. When the door is opened, an event is generated, and an event handler, with
your code in it, is fired.
So, you could say that your event-driven application has no beginning and no end.
Event handlers are called when events are generated, and in the order in which
they were generated.
* Windows, Visual Basic and VB are registered trademarks of Microsoft Corporation
Inc.
** Delphi is a registered trademark of Borland Inc.