HP 3000 Manuals

Standard Functions [ HP ALLBASE/BRW Reference Manual ] MPE/iX 5.0 Documentation


HP ALLBASE/BRW Reference Manual

Standard Functions 

HP ALLBASE/BRW includes many built-in functions.  These are listed in the
Standard Functions table, and each is described on the following pages.

          Standard Functions Table 

------------------------------------------------------------------------------------------
-     Type             Function             Format               Explanation             -
------------------------------------------------------------------------------------------
|     DATE     ADD_DAYS                  (date1, int) Returns date which is date1 plus   |
|              ADD_WEEKS                              int days, weeks, months or years.  |
|              ADD_MONTHS                                                                |
|              ADD_YEARS                                                                 |
-                                                                                        -
|              SUB_DAYS                  (date1, int) Returns date which is date1 minus  |
|              SUB_WEEKS                              int days, weeks, months, or years. |
|              SUB_MONTHS                                                                |
|              SUB_YEARS                                                                 |
------------------------------------------------------------------------------------------
|     TIME     ADD_HOURS                 (time1, int) Returns time1 plus int hours,      |
|              ADD_MINUTES                            minutes or seconds.                |
|              ADD_SECONDS                                                               |
-                                                                                        -
|              SUB_HOURS                 (time1, int) Returns time1 minus int hours,     |
|              SUB_MINUTES                            minutes or seconds.                |
|              SUB_SECONDS                                                               |
------------------------------------------------------------------------------------------
|      I       DAY_OF_WEEK                  (date)    Returns integer value of day       |
|              DAY_OF_MONTH                           (1...6, 1...31, 1...366).          |
|              DAY_OF_YEAR                                                               |
-                                                                                        -
-      I       WEEK_OF                      (date)    Returns integer value of week.     -
-                                                                                        -
-              MONTH_OF                     (date)    Returns integer value of month.    -
-                                                                                        -
|              YEAR_OF                      (date)    Returns 4 digit year value         |
|                                                     (0000...9999).                     |
------------------------------------------------------------------------------------------
|      I       HOUR_OF                      (time)    Returns integer value of hour,     |
|              MINUTE_OF                              minutes, or seconds (0...23,       |
|              SECOND_OF                              0...59).                           |
------------------------------------------------------------------------------------------
|      I       DAYS_DIFF                   (date1,    Returns number of days, weeks,     |
|              WEEKS_DIFF                   date2)    months, or years between date1 and |
|              MONTHS_DIFF                            date2.                             |
|              YEARS_DIFF                                                                |
------------------------------------------------------------------------------------------
|      I       HOURS_DIFF                  (time1,    Returns integer value of           |
|              MINUTES_DIFF                 time2)    difference between time1 and time2 |
|              SECONDS_DIFF                           in hours, minutes, or seconds.     |
------------------------------------------------------------------------------------------
|      I       TO_INTEGER                (number)     Returns an integer equivalent to   |
|                                          (string)   number                             |
|                                                     Returns an integer equivalent to   |
|                                                     string (string must be a numeric   |
|                                                     string)                            |
------------------------------------------------------------------------------------------

          Table 15-0.  Standard Functions Table (cont.) 

------------------------------------------------------------------------------------------
-     Type             Function             Format               Explanation             -
------------------------------------------------------------------------------------------
|     REAL     TO_REAL                   (number)     Returns a real number equivalent   |
|                                          (string)   to number                          |
|                                                     Returns a real number equivalent   |
|                                                     to string (string must be a        |
|                                                     numeric string)                    |
------------------------------------------------------------------------------------------
-     REAL     ABS                         (number)   Returns absolute value of number   -
-                                                                                        -
-              ARCTAN                                 Returns arc tangent of number      -
-                                                                                        -
-              ARCCOS                                 Returns arc cosine of number       -
-                                                                                        -
-              COS                                    Returns cosine of number           -
-                                                                                        -
|              EXP                                    Returns exponent to the power of   |
|                                                     number                             |
-                                                                                        -
|              LN                                     Returns natural logarithm of       |
|                                                     number                             |
-                                                                                        -
|              LOG                                    Returns base 10 logarithm of       |
|                                                     number                             |
-                                                                                        -
-              SIN                                    Returns sine of number             -
-                                                                                        -
-              SQR                                    Returns square of number           -
-                                                                                        -
-              SQRT                                   Returns square root of number      -
-              TAN                                    Returns tangent of number          -
------------------------------------------------------------------------------------------
|   NUMERIC    TO_NUMERIC                  (number)   Returns a Numeric number           |
|                                                     equivalent to number               |
|                                          (string)   Returns a Numeric number           |
|                                                     equivalent to string (string must  |
|                                                     be a numeric string)               |
------------------------------------------------------------------------------------------
|    STRING    TO_STRING                   (number)   Returns a string equivalent to     |
|                                                     number                             |
------------------------------------------------------------------------------------------

Related Sections 

   *   Arguments

   *   Conversion Functions

   *   Functions

   *   Types



MPE/iX 5.0 Documentation