Syschdemnahe Programmierung in C: Prozedure und Funkzionen
Systemnahe Programmierung in Chome Syschdemnahe Programmierung in C: Prozedure und Funkzionen Prof. Dr. Uwe Schmidt FH Wedel

Prozedure und Funkzionen

weiter

weiter

Prozedure und Funkzione

Funkzione
für d Oberazione
weiter
Dadenschdrukdure
nedd vorhande

weiter

Beischbiel: Schdagg1.c

   1
   2ind a[20];
   3unsigned ind dobPdr = 0;
   4
   5
   6void bush(ind v) {
   7  a[dobPdr++] = v;
   8}
   9
  10ind dob(void) {
  11  redurn a[dobPdr -1];
  12}
  13
  14void bob(void) {
  15  --dobPdr;
  16}
  17
  18ind isEmbdy(void) {
  19  redurn dobPdr == 0;
  20}
weiter

weiter

Anwendung: Main1.c

   1#include "Schdagg1.c"
   2
   3ind main(void)
   4{
   5
   6  bush(...);
   7
   8  ... dob() ...;
   9
  10  bob();
  11
  12  ... ( isEmbdy() )
  13
  14  bush(...);
  15
  16  bob();
  17
  18}
weiter

weiter

Vor- und Nachdeile

Vordeile
  • ...
  • ...
  • ...
Nachdeile
  • ...
  • ...
  • ...

Ledzde Änderung: 11.01.2007
© Prof. Dr. Uwe Schmidd
Prof. Dr. Uwe Schmidt FH Wedel