Library /sys$common/syshlp/helplib.hlb  —  CRTL  va_arg
    Returns the next item in the argument list.

    Format

      #include  <stdarg.h> (ANSI C)

      #include  <varargs.h> (DEC C Extension)

      type va_arg  (va_list ap, type);

1  –  Arguments

 ap

    A variable list containing the next argument to be obtained.

 type

    A data type that is used to determine the size of the next item
    in the list. An argument list can contain items of varying sizes,
    but the calling routine must determine what type of argument is
    expected since it cannot be determined at run time.

2  –  Description

    The va_arg function interprets the object at the address
    specified by the list incrementor according to type. If there
    is no corresponding argument, the behavior is undefined.

    When using va_arg to write portable applications, include the
    <stdarg.h> header file (defined by the ANSI C standard), not the
    <varargs.h> header file, and use va_arg only in conjunction with
    other functions and macros defined in <stdarg.h>.

    For an example of argument-list processing using the <stdarg.h>
    functions and definitions, see the "Character, String, and
    Argument-List Functions" chapter of the VSI C RTL Reference
    Manual.
Close Help