division-by-zero

A number or a time was divided by zero.

run error, shown by synod run.

divided by needs a divisor that is not 0 and not 0s. math.Remainder of a by b has the same rule for b. The run stops at the division, because the result would not be a number.

Example

Run this program to see the diagnostic.

# package main
use std/sim

define main
  sim.StopAt (1s divided by 0)

Diagnostic

failed at 0s: p/main.synod:5:15: error[division-by-zero]: division by zero

Fix

Divide by a number that is not zero.

# package main
use std/sim

define main
  sim.StopAt (1s divided by 2)