Hi, I'm Ask INFA!
What would you like to know?
ASK INFAPreview
Please to access Ask INFA.

Table of Contents

Search

  1. Preface
  2. Understanding Data Types and Field Properties
  3. Designing Processes
  4. Using and Displaying Data
  5. Designing Guides
  6. Designing Process Objects
  7. Designing Service Connectors
  8. Using App Connections
  9. System Services, Listeners and Connectors
  10. Designing Human Tasks

Design

Design

ceiling

ceiling

Returns the smallest, that is, closest to negative infinity number with no fractional part that is not less than the value of argument. If the type of argument is one of the four numeric types
xs:float
,
xs:double
,
xs:decimal
, or
xs:integer
, the type of the result is the same as the type of argument. If the type of argument is a type derived from one of the numeric types, the result is an instance of the base numeric type.

Syntax

fn:ceiling(arg)
The following table describes the argument for this command:
Argument
Required/Optional
Description
arg
Required
Numeric data type. You can enter any valid expression.

Return Value

  • Integer if you pass a numeric value with declared precision between 0 and 28.
  • Double value if you pass a numeric value with declared precision greater than 28.
  • NULL if a value passed to the function is NULL.

Examples

The following table lists some sample values and return values:
SAMPLE FUNCTION
OUTPUT
fn:ceiling(5)
5
fn:ceiling(5.1)
6
fn:ceiling(5.5)
6
fn:ceiling(-5.5)
-5
fn:ceiling(-5.51)
-5
fn:ceiling( () )
()
The following expression returns the price rounded to the next integer:
fn:ceiling( PRICE )
PRICE
RETURN VALUE
39.79
40
125.12
126
74.24
75
NULL
NULL
-100.99
-100

Tip

You can perform arithmetic on the values passed to ceiling before ceiling returns the next integer value. For example, if you wanted to multiply a numeric value by 10 before you calculated the smallest integer less than the modified value, you might write the function as follows:
fn:ceiling( PRICE * 10 )

0 COMMENTS

We’d like to hear from you!