Zilog ZUSBOPTS Bedienungsanleitung Seite 466

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 520
  • Inhaltsverzeichnis
  • FEHLERBEHEBUNG
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 465
Standard Functions UM017105-0511
438
Zilog Developer Studio II – ZNEO™
User Manual
See the next section, scanf Conversion Characters, for valid input information.
Synopsis
#include <stdio.h>
int scanf(const char *format, ...);
Returns
The value of the macro EOF if an input failure occurs before any conversion. Otherwise,
the
scanf function returns the number of input items assigned, which can be fewer than
provided for, or even zero, in the event of an early conflict between an input character and
the format.
Examples
int i
scanf("%d", &i);
The following example reads in two values. var1 is an unsigned char with two decimal
digits, and
var2 is a float with three decimal place precision.
scanf("%2d,%f",&var1,&var2);
scanf Conversion Characters
d Matches an optionally signed decimal integer, whose format is the same as
expected for the subject sequence of the strtol function with the value 10 for the
base argument. The corresponding argument is a pointer to integer.
i Matches an optionally signed integer, whose format is the same as expected for
the subject sequence of the strtol function with the value 0 for the base argu-
ment. The corresponding argument is a pointer to integer.
o Matches an optionally signed octal integer, whose format is the same as
expected for the subject sequence of the strtol function with the value 8 for the
base argument. The corresponding argument is a pointer to integer.
u Matches an unsigned decimal integer, whose format is the same as expected for
the subject sequence of the strtol function with the value 10 for the base argu-
ment. The corresponding argument is a pointer to unsigned integer.
x Matches an optionally signed hexadecimal integer, whose format is the same as
expected for the subject sequence of the strtol function with the value of 16 for
the base argument. The corresponding argument is a pointer to integer.
e,f,g Matches an optionally signed floating-point number, whose format is the same as
expected for the subject string of the strtod function. The corresponding argu-
ment is a pointer to floating.
Note:
Seitenansicht 465
1 2 ... 461 462 463 464 465 466 467 468 469 470 471 ... 519 520

Kommentare zu diesen Handbüchern

Keine Kommentare