By John Schettino
Welcome to the first installment of the NS BASIC column! In this column,
I will show you how to use NS BASIC to create your own programs, right on
your Newton. We'll start small, and work our way up to major applications.
I expect that it will take several months to present enough information for
a first-time programmer to learn enough to create a large program. Along
the way I'll try and present small, useful programs that will help you learn
how to program. If you're already a BASIC programmer, you may find some
interesting tidbits in each installment. I'll try and include something for
Let me introduce myself: my name is John Schettino. I've been involved with NS BASIC from the beginning. I was a Beta tester of the original product, and have been working with the NS BASIC Corporation since the summer of 1994. I co-authored (with Liz O'Hara) the second and third editions of the NS BASIC handbook that ships with the product, as well as many of the example programs included with it. We've also just completed a book on NS BASIC programming for Academic Press Professional. I'm not going to present the same material in this column, but rather will try and cover both ends not discussed in great detail in the book. By that I mean I will attempt to cover very basic programs in detail, as well as very advanced techniques. The book is described in my WWW Home page, so you can visit that site and read all about it. I'm also a contributing editor for PDA Developers Magazine, where I write about NewtonScript programming. I'm a senior member of the technical staff at GTE Laboratories, Inc., where I research mobile and wireless computing, object oriented and distributed systems, and other fun topics. I think that PDAs are a vital step in the information revolution, and I hope to show you how to use the Newton and NS BASIC to fulfill your own information needs.
The first few columns will present some of the history of NS BASIC,
and will get you started with programming. I cannot hope to teach you everything
you need to learn, but fortunately you can explore and teach yourself quite
a bit. Each column will present a complete program, as well as a bit of a
description of what the program is attempting to do, and how you might use
similar approaches for other Newton programs. Each column will also include
a "Tip of Month" section at the end, showing an unusual (some call them
undocumented) feature of NS BASIC. I'm open to suggestions for programs,
but for now here's what I intend to present:
Where do you get NS BASIC? The package is available for $99 from some retailers, and directly from NS BASIC corporation. This link points to the NS BASIC Home Page on the World Wide Web:
You'll find lots of information on NS BASIC at this site, including example programs and ordering information.
They also have information on Compuserve, eWorld and AOL. You can email them at email@example.com, fax them at 416 264-5888, or call them at 416 264-5777.
You can also install a Newton Book that contains sample screens and NS
My own home page is at:
You can also send me email at firstname.lastname@example.org.
The rest of this column contains an interview with George Henne. I asked George a number of questions about the past, present, and future of NS BASIC. First, here's his introduction:
GH: I've been involved in all aspects of computer programming for 25 years now, from assembly language hacking to Object oriented programming; from writing operating systems to doing communications programming to writing end user business applications. I've even taught programming languages at a university level.
JS: Why did you decide to create a Newton programming environment? Why did you decide to use BASIC?
GH: The native Newton programming environment, NewtonScript, is
an exciting and challenging one. I dove into it full time. Three months later,
I thought I had it down. Two years later, I'm still learning things about
The Newton is an extremely personal computer. There are literally millions of people out there who can program computers to various extents; few of them will have the time and resources to master NewtonScript, but I thought quite a few would like to be able to program their Newts.
To make the Newton accessible to the rest of the people who want to program it, I thought a programming language would be nice to produce. Rather than inventing my own, I chose one that millions of people would already be familiar with.
JS: What kinds of programs did you expect people to write?
GH: I didn't have a lot of preconceived notions on this. I definitely drew on my experience as an applications programmer to make sure it had the functions it needed. Since it is layered on top of the rich Newton environment, I was also able to inherit a lot of the functionality already built into the Newton.
JS: How has NS BASIC evolved in its first year? How are people actually using it?
GH: It's come a long way. As originally conceived, it was going
to be a BASIC with about the functionality of a normal DOS BASIC. Then the
communications stuff got added, and then all the Window objects: suddenly,
it became a pretty serious BASIC.
I'm continually amazed by the applications that people are creating. I designed it without a whole lot of built in limits, so I shouldn't be surprised how big and extensive the programs people are creating are, but I still am.
JS: What is your approach to new revisions?
GH: I think a language that doesn't have new revisions planned will wither, so it's a continuous process. I see new revs alternating between adding new features and boosting performance.
JS: Where do you see NS BASIC going?
GH: NS BASIC will follow its customers. We're heavily influenced by requests from our users. We also plan to take advantage of new capabilities that may come with new models of the Newton from Apple and its licensees.
JS: What are some of the new capabilities you're working on for the next version?
GH: The next rev will focus on boosting performance. We've got a bunch of interesting ideas on this we've been testing in the lab, and I think people will like the results.
JS: How can people distribute programs they write with NS BASIC?
GH: NS BASIC currently comes with a Runtime module that can be freely distributed. Programs you create using the full version of NS BASIC can be downloaded to a Newton with the Runtime and they'll work.
We're working with Apple to find ways to produce standalone packages. It's important that the solution we come up not rely on undocumented features and be capable of dealing with full sized NS BASIC programs.
JS: What's your favorite NS BASIC program/use of NS BASIC?
GH: One of my favorites is a guy who's using it to control an electric train set through the serial port. There are also a lot of business data collection apps that are well done.
My next column will present a simple program in NS BASIC. Nothing fancy, we'll just get one into NS BASIC and run it. I'll talk about options for programming, dealing with line numbers, and other beginning topics. See you then!