Every programming language has some built-in functions that help the programmer do some routine tasks. Rexx also has a lot of built in functions.
Let’s look at all of these functions available in Rexx.
Sr.No. | Functions available in Rexx |
---|---|
1 | ADDRESS
This method returns the name of the environment in the which the Rexx commands are currently running in. |
2 | BEEP
This method produces a sound in the system at a particular frequency and duration. |
3 | DataType
This method returns the value of ‘NUM’ if the input is a valid number else it will return the value of ‘CHAR’. You can also specify if you want to compare the input value to a NUM or CHAR value. In each case, the value returned will be either 1 or 0 depending on the result. |
4 | DATE
This method returns the local date in the following format. |
5 | DIGITS
This method returns the current setting of NUMERIC DIGITS as defined in the current system. |
6 | ERRORTEXT
This method returns the Rexx error message associated with error number ‘errorno’. Please note that the error number needs to be a value from 0 to 99. This is useful in cases wherein your program returned an error code and you want to know what the error code means. |
7 | FORM
This method returns the current setting of ‘NUMERIC FORM’ which is used to do mathematic calculations on the system. |
8 | TIME
This method returns the local time in the 24-hour clock format as shown in the following program. |
9 | USERID
This method returns the current user id logged into the system. |
10 | XRANGE
This method returns the characters in the range specified by the start and end character. |
11 | X2D
This method returns the decimal conversion of a hexstring value. |
12 | X2C
This method returns the character conversion of a hexstring value. |