![](/images/backgrounds/286549/hp-sunsoft-pascal-4-0-users-manual-549395123x1.png)
6
The Pascal procedure, DaysOfWeek.p
The C main program, DaysOfWeekMain.c
type
TDay= array [0..8] of char; TWeek = array [0..6] of day; TYear = array [0..51] of week;
procedure DaysOfWeek(var Y: TYear); begin
v[1][1] := 'Sunday'; end;
#include <stdio.h>
extern void DaysOfWeek(char [][7][9]);
int main(void)
{
char Year[52][7][9];
DaysOfWeek(Year);
printf(" Day = '%s' \n", Year[1][1]);
}
The commands to compile and execute DaysOfWeek.p and DaysOfWeekMain.c without
The commands to compile and execute DaysOfWeek.p and DaysOfWeekMain.c with
hostname% pc
hostname% cc DaysOfWeek.o DaysOfWeekMain.c
Day = ''
hostname% pc
hostname% cc DaysOfWeek.o DaysOfWeekMain.c
day = 'Sunday '
The | 99 |