TI-BASIC Wiki
Register
Advertisement

A boolean value is a value that represents True or False. Decisions made by a program are determined by these two values. If this is true, do that. While that remains true, continue doing this. Different programing languages have different ways of dealing with Booleans. In fact, different versions of TI-BASIC have different ways of dealing with booleans.

TI-83 and TI-84 Series[]

In TI-84, regular integers usable as boolean, and evaluate any 0 value false and any non-zero value true.

This implementation of boolean does make several things easier. First and most obviously, if the condition is X0, only X has to be written.

The second is that, since any functions that return a boolean use 1 as the true value, it can be multiplied by a value and add 0 or 1 rather than either don't add something or add 1. Such as instead of If K=26:X+1X, one can use X+(K=26)→X for the same result.

TI-89[]

An infinitely more boring version exists in TI-89; true is true and false is false. True is not 1, False is not 0. If 1 is meaningless.

Advertisement