Prototype: islessthan(value1, value2)

Return type: boolean

Description: Returns whether value1 is less than value2.

The comparison is made numerically if possible. If the values are strings, the comparison is lexical (based on C's strcmp()).

Arguments:

  • value1: string - Smaller string or value - in the range: .*
  • value2: string - Larger string or value - in the range: .*

Example:

code
body common control
{
      bundlesequence => { "test" };
}

bundle agent test
{
  classes:

      "ok" expression => islessthan("0","1");

  reports:

    ok::

      "Assertion is true";

    !ok::

      "Assertion is false";

}

Output:

code
R: Assertion is true

See also: isgreaterthan().