Mixed language programs

Rahul Dhesi dhesi at bsu-cs.UUCP
Sat Feb 27 09:47:03 AEST 1988


In article <687 at l.cc.purdue.edu> cik at l.cc.purdue.edu (Herman Rubin) writes:
>Telling me that what I want to do in part of my code can be done in
>FORTRAN, another part in PASCAL, another part in ..., where each part
>is a small number of lines, is stupid.  I do not know of any way to 
>combine anything smaller than subroutines from different compilations...

We have strayed from our punched-card heritage, which gives us all the
solutions we need.  Mixing languages is trivial if we simply go back to
our roots, and use columns 78-80 of each card to specify which language
to compile code in.

//EXEC DD *                                                      JCL
     if i < 10 then                                              PAS
	{                                                          C
	   while (--i < (int) *++a[--j+xyz->++q])                  C
	     PERFORM ADD_ONE_TO_INPUT_RECORD                     COB
	     SAY @40 "ENTER TWO NUMBERS"                         DB3
	     DO 10 J = I, 2, 100                                 FOR
		exception when INPUT_ERROR =>                    ADA
		   perror ("input");                               C
		end                                              ADA
10           CONTINUE	                                         FOR
	 }                                                         C
-- 
Rahul Dhesi         UUCP:  <backbones>!{iuvax,pur-ee,uunet}!bsu-cs!dhesi



More information about the Comp.lang.c mailing list