HP SunSoft Pascal 4.0 Bedienungsanleitung Seite 153

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 333
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 152
The C–Pascal Interface 129
6
Value Parameters
In general, Pascal passes value parameters in registers or on the stack,
widening to a full word if necessary.
Simple Types
With value parameters, simple types match, as in the following example:
The C function, SimVal.c void SimVal(
char t,
char f,
char c,
short si,
int i,
float sr,
double r,
int *reply)
{
*reply = 0;
if (t) *reply += 01;
if (!f) *reply += 010;
if (c == 'z') *reply += 0100;
if (si == 9) *reply += 01000;
if (i == 9) *reply += 010000;
if (sr ==(float)9.9) *reply += 0100000;
if (r == 9.9) *reply +=01000000;
}
Seitenansicht 152
1 2 ... 148 149 150 151 152 153 154 155 156 157 158 ... 332 333

Kommentare zu diesen Handbüchern

Keine Kommentare