D Programming Language 2.0

- Comments
- D
- Search
- Home

Last update Thu May 12 16:55:01 2011

# core.vararg

The vararg module is intended to facilitate vararg manipulation in D. It should be interface compatible with the C module "stdarg," and the two modules may share a common implementation if possible (as is done here).

License:
Boost License 1.0

Authors:
Walter Bright, Hauke Duden

Source:
core/vararg.d

alias va_list;
  The base vararg list type.

void va_start(T)(out va_list ap, ref T parmn);
  This function initializes the supplied argument pointer for subsequent use by va_arg and va_end.

  Parameters:

  ap | The argument pointer to initialize.
  paramn | The identifier of the rightmost parameter in the function parameter list.

T va_arg(T)(ref va_list ap);
  This function returns the next argument in the sequence referenced by the supplied argument pointer. The argument pointer will be adjusted to point to the next arggument in the sequence.

  Parameters:

  ap | The argument pointer.

  Returns:
  The next argument in the sequence. The result is undefined if ap does not point to a valid argument.

void va_end(va_list ap);
  This function cleans up any resources allocated by va_start. It is currently a no-op and exists mostly for syntax compatibility with the variadric argument functions for C.

  Parameters:

  va_list ap | The argument pointer.

void va_copy(out va_list dst, va_list src);
  This function copied the argument pointer src to dst.

  Parameters:

  va_list src | The source pointer.
  va_list dst | The destination pointer.

Copyright Digital Mars 2000 - 2009. | Page generated by Ddoc.