#pragma linkage(cobrtn,COBOL)
#include <stdio.h>
void cobrtn (int array[2]);
int main()
{
int array[2];
array[0]=1;
array[1]=2;
cobrtn(array);
/* array by reference */
}
|
IDENTIFICATION DIVISION.
PROGRAM-ID. COBRTN.
ENVIRONMENT DIVISION.
DATA DIVISION.
LINKAGE SECTION.
01 ARRAY.
05 ELE PIC S9(9) BINARY OCCURS 2.
PROCEDURE DIVISION USING ARRAY.
DISPLAY ELE(1) ELE(2)
GOBACK.
END PROGRAM COBRTN.
|