Library /sys$common/syshlp/helplib.hlb  —  CRTL  _toupper
    Converts a lowercase character to uppercase.

    Format

      #include  <ctype.h>

      int _toupper  (int character);

1  –  Argument

 character

    This argument must be a lowercase letter.

2  –  Description

    The _toupper macro is equivalent to the toupper function except
    that its argument must be a lowercase letter (not uppercase, not
    EOF).

    As of OpenVMS Version 8.3 and to comply with the C99 ANSI
    standard and X/Open Specification, the _toupper macro by default
    does not evaluate parameters more than once. It simply calls
    the toupper function. This avoids side effects (such as i++
    or function calls) where the user can tell how many times an
    expression is evaluated.

    To keep the older, optimized _toupper macro behavior, compile
    with /DEFINE=_FAST_TOUPPER. Then, as in previous releases, _
    toupper optimizes the call to avoid the overhead of a runtime
    call. The parameters are checked to determine how to calculate
    the result, thereby creating unwanted side effects. So when
    compiling with /DEFINE=_FAST_TOUPPER, do not use the _toupper
    macro with arguments that contain side-effect operations. For
    instance, the following example will not return the expected
    result:

    d = _toupper (c++);

3  –  Return Value

    x                  The uppercase letter corresponding to the
                       argument.
Close Help