TI NSpire now supports user programs


The latest operating system now supports user-defined programs in addition to user-defined functions. Lack of programming capability was a major deficiency of the original NSpire. It looks like they listened to those who complained.


Thank you for the update Don. I just updated one OS of one TI NSpire CAS calculator, and working on updating the second one!

Looks like TI also updated the manuals for the calculator.


Edited: 6 Oct 2007, 5:50 p.m.


So, what do the programs look like? Is it a TI-specific language? Something akin to BASIC?


(btw, Don, I'll get back to your email shortly... ;-)


It's a lot like BASIC, or TI-BASIC. Here is our HCC2007 programming contest (rearrange the digits of an input number into numerical order) done on the NSpire:

Define rev_digits(num)=Prgm
:Local i,a,n
:For i,0,iPart(log(num,10))
:SortA a
:For i,1,dim(a)
:Disp n

I just get each digit of the input number and store it in a list, then sort the list, then convert the list items back into an integer number.


Nice listing Don. Thanks!!



hi Don,

for comparison, here's the same problem in LUA on the 50g,

function sortNum(n)
a = {tostring(n):byte(1,-1)} -- unpack unto array
return tonumber(string.char(unpack(a))) -- pack back and return

Edited: 7 Oct 2007, 4:58 p.m.


Very compact code, Hugh, thanks. Is LUA an add-on language to the 50g? I'm not familiar with it, but then I'm not really an RPL guy.


hi don,

"not an RPL" guy", i'm with you there. although i like RPN, ive always found RPL clumsy and almost totally unreadable.

you might like to try your hand at lua on the 50g. get my latest release at:


should be hplua-1.0.1.zip. this contains the source code, but all you need is the ARMToolbox and the flua.hp program. once loaded you can try some of my samples like sunset.lua and sudoku.lua

also checkout www.lua.org for the language reference and also the book, "Programming in Lua, Second Edition (Paperback) by Roberto Ierusalimschy", is highly recommended.

good luck!


Thanks, Hugh. I don't have a 50g (there was a door prize of same, but they didn't call my number early enough!). I will check out that book, however, as I am intrigued by how such a small bit of code can do what it does. Very nice.


There is a significant omission from the BASIC instruction set on the NSpire: the Input command. From what I have read, I think this was done on purpose. TI apparently wants the NSpire to be strictly an educational tool, not a "gaming" machine with interactive inputs. Without an Input command, kids who are supposed to be learning the characteristics of a right triangle will not be playing Legends of Doom instead. This is probably the reason that only functions were originally supported.

The only way to provide inputs to your program is to pass them as arguments when you run the program. Hey, that's how FORTRAN worked on the Univac 1108 when I started programming in 1974!


I checked the Reference Manual of the TI nspire and, you are right, there is no Input statement!!!!

Having not gone over the entire Reference Manual yet, can you access individual matrix elements using [row,col] or (row,col)?



I believe so. I have not done a matrix yet, but you access individual list entries like this: if list a = {1, 2, 3, 4}, then a[3] = 3.



BTW in the HHC2007 group picture I appear right behind you in the line of vision!!! I hold in my hands my new HP-35s and an early version of the HP-41C that my son's university was willing to retire in my care. Thank you NAU!!!



Edited: 7 Oct 2007, 9:20 a.m.


I think this was done on purpose. TI apparently wants the NSpire to be strictly an educational tool, not a "gaming" machine with interactive inputs.

And we all know that INPUT serves no purpose other than games.

What a crock. :-(

The only way to provide inputs to your program is to pass them as arguments when you run the program. Hey, that's how FORTRAN worked on the Univac 1108 when I started programming in 1974!

I'm 99.99% certain that FORTRAN IV on the 1108 supported input files.


Yeah, that's true. I meant interactive input with a live user. In those days of mainframes only, it was all file processing.


The 1108 supported interactive terminals (e.g., model 33 or 35 Teletypes, Univac DCT 500 or 100, or Uniscope 100 or 300), which could be opened as files. Your site may not have had any, but it wasn't a fundamental limitation of the computer or software.

There was even a "Conversational Fortran V" for it.


Eric, I worked on that Univac 1108 as my first programming job in 1974 at the US Census Bureau in Suitland Maryland (just outside Washington DC). In those days, we punched our FORTRAN progam source code on punch-cards, submitted a batch job overnight to compile the program, and came back the next day to see how many errors we had. Those were the days! Then came the model 33 teletypes, then came the DCT interactive terminals. But the 1108 was never as good at interactive things as it was at batch things. The Census Bureau was a huge file processing organization. All of our programs were designed to read tape files, update the data with various transactions, and write back out onto tape. I forget the tape density, but I think it was 6250 bpi when I left the Bureau around 1983. A file for the whole US might be 100 tapes.

Since our applications did so much IO, the Bureau system guys wrote their own IO system that all us programmers used, called CENIO. It was (supposedly, I never doubted them though) much faster than standard FORTRAN IO.

In those glory days before the personal computer, we never imagined that anyone could actually have and use a computer at home. How times have changed.


This was my experience also. Big fat decks of cards, HOPEFULLY numbered so that the inevitable "whoops!" didn't cause 52-card-pickup (or in some cases, 1052-card-pickup :-), and data was provided inline or in a separate deck. I was lucky if the results came back the next day; it usually took a day or so to get my job run. That was, after all, the value in desk checking your program -- you didn't want to have to resubmit it because you screwed it up somewhere.

I didn't even see "real" input methods until the paper tape machine came along. I could feed my program in again and again after meticulously punching the tape the first time. Back then, the paper tape seemed like MAGIC compared to decks of Fortran cards. ;-)

Ah, how quickly we take technology for granted these days...


Edited: 8 Oct 2007, 6:58 p.m.


My point is that Fortran on the 1108 was certainly capable of both:

  • use of interactive terminals
  • data input from various sources, including interactive terminals

Sure, it was better at batch, and that was how most people used it, but it wasn't the only possibility. The Executive had support for interactive use before 1970, though I'm not sure exactly when it became available. I didn't use an 1100 series machine until the early 1980s, so I'm not as well-versed in its history as the DEC machines.

I forget the tape density, but I think it was 6250 bpi when I left the Bureau around 1983.

Sounds about right. The switch from 800 bpi NRZI to 1600 bpi PE occurred in the early to mid 1970s, and 6250 bpi GCR became available in the late 1970s. Some vendors offered 3200 bpi (PE?), but it wasn't a standard and never caught on. (Before 9-track tape there was 7-track at 200, 556, or 800 BPI.)

Possibly Related Threads…
Thread Author Replies Views Last Post
  Does the HP Prime really compiles the user programs? CompSystems 3 2,788 12-13-2013, 01:55 PM
Last Post: Mike Morrow
  Are HP Prime CAS and TI NSpire CAS the same? hugh steers 14 4,599 10-31-2013, 04:54 PM
Last Post: hugh steers
  Temporary User Mode Key Programs not working in RPN BruceTTT 7 2,723 10-14-2013, 01:46 PM
Last Post: BruceTTT
  Trading TI Nspire CX CAS for HP Prime Justin Sloan (Honolulu) 2 1,350 05-09-2013, 04:22 AM
Last Post: Chris Smith
  User Library programs Michae Altmann 5 1,925 03-05-2013, 06:36 PM
Last Post: Richard Garner
  TI-Nspire on iPad Mic 16 4,505 02-11-2013, 12:16 AM
Last Post: Bruce Bergman
  OT. Linux on a Ti Nspire. Matt Kernal 0 1,029 11-17-2012, 03:52 PM
Last Post: Matt Kernal
  Seeking new resources for TI NSpire Programming Namir 6 2,326 07-29-2012, 03:57 AM
Last Post: fhub
  Interesting TI Nspire CAS CX programming features Namir 5 1,938 04-15-2012, 04:11 PM
Last Post: Namir
  TI CC40 cartridges ... names of programs on them? Gene Wright 3 1,371 04-08-2012, 10:49 PM
Last Post: Palmer O. Hanson, Jr.

Forum Jump: