CEIL

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Language > thinBasic Functions > Numeric functions >

CEIL

 

Description

 

Convert a floating-point variable or expression into an integer-class value, by returning the smallest integer value that is greater than or equal to its argument.

 

Syntax

 

n = CEIL(numeric_expression)

 

Returns

 

Number

 

Parameters

 

Name

Type

Optional

Meaning

numeric_expression

Number

No

Any numeric expression

 

Remarks

 

The CEIL function rounds upward, returning the smallest integral value that is greater than or equal to numeric_expression.

For example, y = CEIL(1.5) places the value 2 into y.

 

Restrictions

 

See also

 

Numeric functions, INT, FRAC, FIX, ROUND,

 

Examples