Table of Contents

THEN

Often alongside GOTO or other statements, jump to another part of the program if a conditional expression, previously evaluated by IF, has been met.

Implemented by: dartmouth1, ansimin, ansifull, Altair, a2int, CBM, Atari, trs80, level2, trscolor, Sinclair, spectrum, Atom, BBC, MSX, bw32, QBasic, VBDOS, FreeBASIC, Gambas, minibasicmm

With variations:

Also written as:

Usage

Variations

Examples

This is the canonical application of THEN, sided by GOTO:

50 IF A < 30 THEN GOTO 100

Comments

It is unknown if the expression "syntactic sugar" was in use by 1964, but THEN must be a pioneer example. It became optional in many BASIC versions, or could be used alone with the same meaning of GOTO. Its main purpose might be simply to allow a human reader to more easily discern program lines which perform conditional jumps.

GOTO, ON

Similar keywords

In other languages...

Other tags

References