CCL Functions

A function is a self-contained, reusable block of code that performs a specific task.

The Sybase Event Stream Processor supports:

Built-in functions come with the software and include functions for common mathematical operations, aggregations, datatype conversions, and security.

Order of Evaluation of Operations

Operations in functions are evaluated from right to left. This is important when variables depend on another operation that must pass before a function can execute because it can cause unexpected results. For example:

integer a := 1;
integer b := 2;
max( a + b, ++a );

The built-in function max(), which returns the maximum value of a comma-separated list of values, returns 4 since ++a is evaluated first, so max(4, 2) is executed instead of max(3, 2), which may have been expected.