![](/images/backgrounds/286549/hp-sunsoft-pascal-4-0-users-manual-549395118x1.png)
6
The C main program, SampMain.c. Note the procedure definition and call.
#include <stdio.h>
extern void Samp(int *, double *);
int main (void)
{
int | i | ; |
double | d | ; |
Samp(&i, &d) ;
printf ("%d %3.1f \n", i, d) ;
}
The commands to compile and execute Samp.p and
SampMain.c
hostname% pc
9 9.9
Variable Parameters
Pascal passes all variable parameters by reference, which C can do, too.
94 | Pascal 4.0 User’s Guide |