next up previous 252
Next: Arguments
Up: CNF and F77 Mixed Language Programming - FORTRAN and C
Previous: Same Language - Different Compiler


Communication Between Routines

There are three ways of passing data between a program and a subprogram: (i) the argument list of the subprogram, (ii) the return value of the subprogram if it is a function and (iii) global variables. The concept of arguments and return values of subprograms are common to many programming languages including FORTRAN and C. The ways in which global variables are handled are rather different. In FORTRAN there are common blocks whereas in C there are external variables or structures. Each of these will be considered in turn.





next up previous 252
Next: Arguments
Up: CNF and F77 Mixed Language Programming - FORTRAN and C
Previous: Same Language - Different Compiler

CNF and F77 Mixed Language Programming -- FORTRAN and C
Starlink User Note 209
P.M. Allan
A.J. Chipperfield
R.F. Warren-Smith
19 January 2000
E-mail:ussc@star.rl.ac.uk