Vax C90-EL SERIES Service Manual Page 150

  • Download
  • Add to my manuals
  • Print
  • Page
    / 216
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 149
Cray Standard C/C++ Reference Manual
#include <stdio.h>
struct
{
int i;
double a[10];
long double d;
} ST;
main()
{
int i;
/* initialize struct ST */
ST.i = 12345;
for (i = 0; i < 10; i++)
ST.a[i] = i;
ST.d = 1234567890.1234567890L;
/* print out the members of struct ST */
printf("In C: ST.i = %d, ST.d = %20.10Lf\n", ST.i, ST.d);
printf("In C: ST.a = ");
for (i = 0; i < 10; i++)
printf("%4.1f", ST.a[i]);
printf("\n\n");
/* call the fortran function */
FCTN();
}
The following example is the Fortran subprogram FCTN called by the previous
Cray Standard C main program:
C *********** Fortran subprogram (f.f): ***********
SUBROUTINE FCTN
COMMON /ST/STI, STA(10), STD
INTEGER STI
REAL STA
DOUBLE PRECISION STD
130 S217936
Page view 149
1 2 ... 145 146 147 148 149 150 151 152 153 154 155 ... 215 216

Comments to this Manuals

No comments