Sample User-Written Functions
Enrichment is shipped with six sample user-written functions which include three normal functions and two extended functions. The three normal functions are NORMC, NORMCOB, and NORMASM. The three extended functions are EXTC, EXTASM and RANDNUM. You can find these functions on the Enrichment installation media.
NORMC |
Reverses a sequence of characters and is written in C. |
NORMCOB | Reverses an input string and is written in COBOL. |
NORMASM | Reverses a sequence of characters and is written in Assembler. |
EXTC | Reverses a sequence of characters and is written in C. During the Initialization call, a counter is initialized. In each normal call, the counter is incremented to calculate the number of times the function is invoked. In the Termination call, the counter is printed. |
EXTASM | Reverses a passed string and is written in Assembler. During the Initialization call, a counter is initialized. In each normal call, the counter is incremented to calculate the number of times the function is invoked. In the Termination call, the counter is printed. |
RANDNUM | Generates a random number using the system time function. It is designed as an extended function to ensure any numbers generated are uniquely random. The function takes a high-range number as an input parameter. |