The bitwise operations (prefix NOT, infix AND, infix OR, and infix EXCLUSIVE OR) are often evaluated by calls to library routines. These operations are, however, handled without a library call if either of the following conditions is true:
For certain assignments, expressions, and built-in function references, the compiler generates calls to library routines. If you avoid these calls, your code generally runs faster.
To help you determine when the compiler generates such calls, the compiler generates a message whenever a conversion is done using a library routine. The conversions done with code generated inline are shown in Table 25.
Many string-handling built-in functions are evaluated through calls to library routines, but some are handled without a library call. Table 26 lists these built-in functions and the conditions under which they are handled inline.
| String function | Comments and conditions |
|---|---|
| BOOL | When the third argument is a constant. The first two arguments must also be either both bit(1) or both aligned bit(n) where n is 8, 16 or 32. The function is also handled inline if it can be reduced to a bitwise infix operation and both arguments are aligned bit. |
| COPY | When the first argument has type character. |
| EDIT | When the first argument is REAL FIXED BIN, the SIZE condition is disabled, and the second argument is a constant string consisting of all 9's. |
| HIGH | Always |
| INDEX | When only two arguments are supplied and they have type character. |
| LENGTH | Always |
| LOW | Always |
| MAXLENGTH | Always |
| SEARCH | When only two arguments are supplied and they have type character. |
| SEARCHR | When only two arguments are supplied and they have type character. |
| SUBSTR | When STRINGRANGE is disabled. |
| TRANSLATE | When the second and third arguments are constant. |
| TRIM | When only one argument is supplied and it has type character. |
| UNSPEC | Always |
| VERIFY | When only two arguments are supplied and they have type character. |
| VERIFYR | When only two arguments are supplied and they have type character. |