ARM VERSION 1.2 Datenblatt Seite 166

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 276
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 165
The C and C++ Libraries
4-76 Copyright © 1999-2001 ARM Limited. All rights reserved. ARM DUI 0067D
printf family
The
printf
family consists of
_printf()
,
printf()
,
_fprintf()
,
fprintf()
,
vprintf()
,
and
vfprintf()
. All these functions use
__FILE
opaquely and depend only on the
functions
fputc()
and
ferror()
. The functions
_printf()
and
_fprintf()
are identical to
printf()
and
fprintf()
except that they cannot format floating-point values.
The standard output functions of the form
_printf(...)
are equivalent to:
fprintf(& __stdout, ...)
where
__stdout
has type
__FILE
.
scanf family
The
scanf()
family consists of
scanf()
and
fscanf()
. These functions depend only on
the functions
fgetc()
,
__FILE
, and
__backspace()
.
The standard input form
scanf(...)
is equivalent to:
fscanf(& __stdin, ...)
where
__stdin
has type
__FILE
.
fwrite(), fputs, and puts
If you define your own version of
__FILE
, and your own
fputc()
and
ferror()
functions
and the
__stdout
object, you can use all of the
printf()
family,
fwrite()
,
fputs()
, and
puts()
unchanged from the library. Example 4-19 shows how to do this. Consider
modifying the system routines if you require real file handling.
Example 4-19 printf() and __FILE
#include <stdio.h>
struct __FILE {
int handle;
/* Whatever you need here (if the only files you are using
is the stdoutput using printf for debugging, no file
handling is required) */
};
FILE __stdout;
int fputc(int ch, FILE *f)
{
/* Your implementation of fputc */
return ch;
}
int ferror(FILE *f)
Seitenansicht 165
1 2 ... 161 162 163 164 165 166 167 168 169 170 171 ... 275 276

Kommentare zu diesen Handbüchern

Keine Kommentare

Source Technologies Urządzenia wielofunkcyjne podręczniki użytkownika

Lista Source Technologies Urządzenia wielofunkcyjne produkty zawierają 1 instrukcje obsługi do modeli 1. Wszystkie podręczniki użytkownika w formacie pdf są dostępne do pobrania lub obejrzenia online.

Kliknij na poniższy alfabet, aby przejść do pełnej listy modeli zaczynających się od tej litery

Modele Rodzaj dokumentu
ST9612
Instrukcja Użytkownika   Source Technologies ST9612 User's Manual, 47 strony