Every programmer knows Lubarsky's Law of Cybernetic Entomology, even if they are not familiar with the name: There's always one more bug. techBASIC has several features to help you tame cybernetic arthropods.

Error Messages

If there is a compile error in your program, or if techBASIC detects a problem while the program is running, an error message is shown. The approximate location is highlighted, and an error message describes the problem.

Setting and Clearing Breakpoints

Setting a breakpoint lets you stop a program at a specific location, examining the current values for variables and watching them change as you step line-by-line through the program. The blue bar to the left of the Source view is the breakpoint bar. Tap on the breakpoint bar to set a breakpoint; tap again to clear it. A line with a breakpoint displays a blue marker like the one shown here.

With a breakpoint set, running the program will stop it at the first breakpoint encountered.

Debugging Programs

Once you stop a program, you can step through line by line to see what it is doing. You can also step into subroutines, or step back out, running at full speed until the subroutine finishes.

While you step, watch the variables change, flip between the variables in the program and the subroutines it called, or even expand the value of a variable. If the value is from a large matrix, you can even scroll within the variable’s value to see all of the numbers in the matrix.

If you’d like to see the debugger in action, check out this demo video.


Moving Data Around

Getting data in an out of techBASIC is easy. The BASIC language reads and writes comma-separated value (CSV) files, which are also supported by almost any spreadsheet or database. In our Stars example, we started with an Internet database of the stars within 10 parsecs of the Sun, sorted and manipulated the information in Excel, then wrote a CSV file. That file was moved to the iPad using iTunes, and the result is a stunning plot of the nearby stars you can twist and zoom to get a feel for stellar space. You can move any data file or program back and forth from your desktop computer using iTunes. Our Quick Start Guide walks you through the process.

You can also email source code or console output using the techBASIC Share button. techBASIC creates beautiful plots, too. The Share button exports those to your photo library at resolutions up to 4 megapixels. From there, you can email the images to others, move them to your desktop computer, or manipulate them with other programs right on your iPad or iPhone.

Programming in techBASIC

techBASIC is a BASIC compiler. There are definitely extensions to handle graphics and to get data from sensors, but the language is a subset of ANSI Standard BASIC. If you already know BASIC, you’ll be programming with techBASIC right away. And if you don’t know BASIC, you aren’t learning some obscure language no one has heard of before, or a proprietary language no one else is even allowed to implement–you’re learning a language that you can use in many other settings, like writing a macro for an Excel spreadsheet. There are hundreds of books and articles about programming in BASIC, from astronomy to business to games.

BASIC was originally designed to make learning to program easy. It was also designed specifically for scientists and engineers, so it had built-in matrix commands. Those were dropped in some implementations of BASIC, but they are back in techBASIC, where you can add two matrices with the + operator, print them just like any other variable, or type in an array constant that looks a lot like a matrix you might write on paper.

As you get started, you can use the samples built right into techBASIC to create your own programs. As just one example, you can treat techBASIC like a very powerful graphing calculator by changing a simple function definition to plot your own functions in two or three dimensions. Unlike graphics calculators, though, you are not limited to a single line function–you can, for example, test the X value to see if you are in an area that needs special treatment, as you see in our sample that plots sin(x)/x. There is a singularity at 0, where the limit approaches 1, so our program tests for this condition.



BASIC Programming Right On Your iPhone/iPad

  1. Use standard iOS controls to create stunning GUIs

  2. Array and matrix commands like matrix inversion, determinants, matrix arithmetic and more

  3. Step and trace debugger

    •  Set breakpoints with a tap

    •  See current variables, both local and global

    •  See everything in a variable, even large matrices

  1. 43 statements

  2. 41 functions

  3. 34 classes with 362 methods, including GUIs, graphics, sensor data collection and matrices

  4. Works on the iPad, iPod or iPhone

Watch Programming Video

Watch Visualization Video

See this blog to see how to create the iPad program shown.

Apps for people who think.™


The built-in help system gives you all of the details about every statement, function and class in techBASIC. The information you need to create programs is literally a touch away.

You can also download the techBASIC reference manual, chock-full of samples and other useful information. But you don’t want to learn a program from a reference manual, no matter how much you want to have one around, so we also created a Quick Start guide. You can download both now to get even more information about techBASIC. Both are available from the techBASIC documentation page.


Create Stunning Interactive GUIs

techBASIC includes all of the standard controls from iOS. Some are even more flexible that the ones available to Objective C programmers. Buttons, for example, support gradient fills without the need to subclass the UIButton object and draw everything yourself. techBASIC controls include sliders, switches, text fields, web pages, maps, and more.

To see controls in action, check out our blog that walks you through the major controls, showing exactly how each is used in a functioning program. Be sure and watch the short movie that accompanies the blog, showing what it covers.