home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a120 / 1.ddi / WATCOM_C / WAT202.C < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-18  |  720 b   |  32 lines

  1. /*------------------------------------------------------------------*/
  2. /* ╡{ªí└╔ªW║┘: wat202.c                                             */
  3. /*------------------------------------------------------------------*/
  4. #include <stdio.h>
  5. #include <conio.h>
  6. #include <stdarg.h>
  7.  
  8. char buf[80];
  9.  
  10. int argument_list(char *previous, ...)
  11. {
  12.    va_list param;
  13.    int cnt;
  14.  
  15.    va_start(param, previous);
  16.    cnt = vsprintf(buf, previous, param);
  17.    va_end(param);
  18.  
  19.    return(cnt);
  20. }
  21.  
  22. void main()
  23. {
  24.    char *str1    = "Fox SoftWare";
  25.    int   number1 = 38;
  26.    float number2 = -179.0;
  27.    char  *str2   = "Microsoft";
  28.  
  29.    argument_list("%s %d %f %s\n",str1, number1, number2,str2);
  30.    printf("%s\n",buf);
  31. }
  32.