somVprintf - Example Code
#include <som.h>
main()
{
va_list args;
somVaBuf vb;
float f = 3.1415;
char c = 'a';
int one = 1;
char *msg = "This is a test";
somEnvironmentNew(); /* Init environment */
vb = (somVaBuf)somVaBuf_create(NULL, 0);
somVaBuf_add(vb, (char *)&one, tk_long);
somVaBuf_add(vb, (char *)&f, tk_float);
somVaBuf_add(vb, (char *)&c, tk_char);
somVaBuf_add(vb, (char *)&msg, tk_pointer);
somVaBuf_get_valist(vb, &args);
somVprintf("%d, %f, %c, %s\n", args);
}
[Back: somVprintf - Related Information]
[Next: somVprintf - Topics]