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

  1. /*------------------------------------------------------------------*/
  2. /* ╡{ªí└╔ªW║┘: wat203.c                                             */
  3. /*------------------------------------------------------------------*/
  4. #include <stdio.h>
  5. #include <conio.h>
  6. #include <stdarg.h>
  7.  
  8. char buffer[80] = "FoxPro 2341 -39501.00 Window";
  9.  
  10. int initial_argu(char *format, ...)
  11. {
  12.    va_list  arglist;
  13.    int cnt;
  14.  
  15.    fflush(stdin);
  16.  
  17.    va_start(arglist, format);
  18.    cnt = vsscanf(buffer, format, arglist);
  19.    va_end(arglist);
  20.  
  21.    return(cnt);
  22. }
  23.  
  24. void main()
  25. {
  26.    char  str1[80];
  27.    int   number1;
  28.    float number2;
  29.    char  str2[80];
  30.  
  31.    initial_argu("%s %d %f %s", str1, &number1, &number2, str2);
  32.    printf("%s %d %f %s", str1, number1, number2, str2);
  33. }
  34.