Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   fwscanf.3p    ( 3 )

ввод символов (character input)

Примеры (Examples)

The call:

int i, n; float x; char name[50]; n = wscanf(L"%d%f%s", &i, &x, name);

with the input line:

25 54.32E-1 Hamster

assigns to n the value 3, to i the value 25, to x the value 5.432, and name contains the string "Hamster".

The call:

int i; float x; char name[50]; (void) wscanf(L"%2d%f%*d %[0123456789]", &i, &x, name);

with input:

56789 0123 56a72

assigns 56 to i, 789.0 to x, skips 0123, and places the string "56\0" in name. The next call to getchar() shall return the character 'a'.