BoundW Function

Purpose

bounds test

Syntax

BoundW[ord](n)

n: integer expression

Description

The BoundW(n) function tests if the parameter n fits in a word. This means that when n < -32768 or n >32767 an error message is reported.

Otherwise n is returned unchanged.

Example

Try

Print BoundW(12345)

Print BoundWord(123456)

Catch

Print "123456 exceeds capacity"

MsgBox(Err$)

EndCatch

Remarks

The BoundW() function serves to find program errors by early discovery of any range violations. BoundWord() is a synonym.

See Also

BoundC(), BoundB(), Bound()

{Created by Sjouke Hamstra; Last updated: 12/05/14 by James Gaite}