Tutorial for Programming in GTB

Interested in learning GTB? You are highly recommended to have basic knowledge of TI-BASIC 83/84 before attempting to learn GTB.

Also, here is the definition of code that is golfed.


The structure and basic principles of GTB are similar to those of TI-BASIC:

  • Each of these characters remain one byte for byte counts
  • If/Then/Else/End structure is kept
  • Colons separate commands

Basic Program

Input a number; if the number is 101, print HELLO WORLD. Otherwise, keep looping till 101 is received as input.

TI-BASIC (ungolfed), 70 characters

:Lbl 1
:Input N
:If N=101
:Goto 1

TI-BASIC (golfed), 57 characters

:Lbl 1:Input N:If N=101:Goto 2:Goto 1:Lbl 2:"HELLO WORLD"

GTB, 29 characters

[`N@N--=1g;1]l;1"HELLO WORLD"

Readers Comments (2)

  1. Your example of “golfed” TI-BASIC code is not very golfed. The following is 24 tokens/bytes:

    Repeat N=101
    Input N

Leave a comment

Your email address will not be published.