beautypg.com

Vsprintf, Synopsis, Returns – Zilog ZUSBOPTS User Manual

Page 485: Example

background image

UM017105-0511

Standard Functions

Zilog Developer Studio II – ZNEO™

User Manual

457

vsprintf

Equivalent to

sprintf

, with the variable argument list replaced by arg, which has been

initialized by the

va_start

macro (and possibly subsequent

va_arg

calls). The

vsprintf

function does not invoke the va_end function.

Synopsis

#include

#include

int vsprintf(char *s, const char *format, va_list arg);

Returns

The number of characters written in the array, not counting the terminating null character.

Example

va_list va;

char buf[80];

/*initialize the variable argument va here*/

vsprint(buf, "%d %d %d",va);

This manual is related to the following products: