tfVSPrintF

Jump to: navigation, search

Table of Contents >> Programmer's Reference


#include <trsocket.h>


int tfVSPrintF (
char TM_FAR * buf0,
const char TM_FAR * fmt0,
va_list ap
);


Function Description

This function is similar to tfSPrintF() except that it takes a va_list structure as its third parameter rather than a variable length list of arguments. It writes formatted data to an array using the following format specifiers:


Format Specifiers:

Code Description
%c Print a character
%d Print a signed decimal integer
%e Scientific notation: prints a lower case e
%E Scientific notation: prints an upper case E
%f Decimal floating point
%g Choose between %e or %f depending on which is shorter
%G Choose between %E or %F depending on which is shorter
%i Print a signed decimal integer
%n The value to which %n corresponds is a pointer to a variable representing the number of characters successfully output
%o Print an unsigned octal
%p Show a pointer
%s Print a string (up to the first null character encountered)
%u Print an unsigned decimal integer
%x Print an unsigned hex integer (lowercase)
%X Print an unsigned hex integer (uppercase)
%% Print a percent sign


Parameters

  • buf0
    The string to be written.
  • fmt0
    The string containing the format specifiers.
  • ap
    A va_list structure containing the variables referred to by the format specifiers.


Returns

  • int
    A number representing the number of characters put into an array.


Table of Contents >> Programmer's Reference