Succ Function

Purpose

Calculates the first natural number greater than an integer expression.

Returns a character whose ASCII value is one greater than the first character of a string expression.

Syntax

% = Succ(n)

$ = Succ[$](a$)

Description

Succ(n) returns the first natural number greater than the integer expression n.

Example

Debug.Show

Trace Succ(4 * 10 + 1)          // Prints 42

Trace Succ("Hello world")       // Prints I

Remarks

Succ(a$) corresponds to Chr$(Succ(Asc(a$))).

Without the optional $ character the function still returns a String data type and not a Variant.

See Also

String, Pred()

{Created by Sjouke Hamstra; Last updated: 23/10/2014 by James Gaite}