REBOL 3 Docs Guide Concepts Functions Datatypes Errors
  TOC < Back Next >   Updated: 6-Feb-2009 Edit History  

REBOL 3 Concepts: Math: Errors

Pending Revision

This document was written for R2 and has yet to be revised for R3.

Math errors are reported when an illegal operation is performed or when an overflow or underflow occurs. The following errors may be encountered in math operations.

Contents

Attempt to divide by zero

An attempt was made to divide a number by 0.

1 / 0
** Math Error: Attempt to divide by zero
** Where: connect-to-link
** Near: 1 / 0

Math or number overflow

An attempt was made to process a number too large for REBOL to handle.

1E+300 + 1E+400
** Math Error: Math or number overflow
** Where: connect-to-link
** Near: 1 / 0

Positive number required

An attempt was made to process a negative number with a math operator that accepts only positive numbers.

log-10 -1
** Math Error: Positive number required
** Where: connect-to-link
** Near: log-10 -1

Cannot use operator on datatype! value

An attempt was made to process incompatible datatypes. The datatype of the second argument in the operation is returned as listed.

10:30 + 1.2.3
** Script Error: Cannot use add on time! value
** Where: connect-to-link
** Near: 10:30 + 1.2.3


  TOC < Back Next > REBOL.com - WIP Wiki Feedback Admin