?/0 ERROR

Radio Shack TRS-80

Severity: Minor

What it means

The /0 code is Radio Shack's Division by Zero error.
Its manual: an attempt was made to use a value of zero in the denominator.

Affected Models

  • TRS-80 Model I with Level II BASIC

How to Fix It

  1. PRINT the variable you divide by in the line the message names. It will be 0.

  2. Guard the division, for example 30 IF D=0 THEN 50.

    For a program that must carry on, Radio Shack's manual shows ON ERROR GOTO used to catch a division by zero.