Last change
on this file since 3066 was 2414, checked in by cmv, 22 years ago |
Exemple pour interface cfortan (CERN) cmv 21/07/2003
|
File size:
689 bytes
|
Rev | Line | |
---|
[2414] | 1 | #include <stdlib.h>
|
---|
| 2 | #include <stdio.h>
|
---|
| 3 | #include <cfortran.h>
|
---|
| 4 | #include <packlib.h>
|
---|
| 5 |
|
---|
| 6 | #define PAWC_SIZE 50000
|
---|
| 7 |
|
---|
| 8 | typedef float PAWC_DEF[PAWC_SIZE];
|
---|
| 9 | #define PAWC COMMON_BLOCK(PAWC,pawc)
|
---|
| 10 | COMMON_BLOCK_DEF(PAWC_DEF,PAWC);
|
---|
| 11 |
|
---|
| 12 | main()
|
---|
| 13 | {
|
---|
| 14 | const int nmax = 300;
|
---|
| 15 | int record_size=1024;
|
---|
| 16 | int istat, n, icycle;
|
---|
| 17 |
|
---|
| 18 | struct { float r; } mycwn;
|
---|
| 19 |
|
---|
| 20 | HLIMIT(PAWC_SIZE);
|
---|
| 21 |
|
---|
| 22 | HROPEN(1,"MYCWN","mycwn.hbook","NX",record_size,istat);
|
---|
| 23 | if (istat) {
|
---|
| 24 | printf("Error in opening file ...");
|
---|
| 25 | return EXIT_FAILURE;
|
---|
| 26 | }
|
---|
| 27 |
|
---|
| 28 | HBNT(1,"MYCWN"," ");
|
---|
| 29 | HBNAME(1,"BLOCK",mycwn.r,"R:R*4");
|
---|
| 30 |
|
---|
| 31 | for (n=0; n<=nmax; n++) {
|
---|
| 32 | mycwn.r = n*n;
|
---|
| 33 | HFNT(1);
|
---|
| 34 | }
|
---|
| 35 |
|
---|
| 36 | HROUT(0,icycle," ");
|
---|
| 37 | HREND("MYCWN");
|
---|
| 38 | KUCLOS(1," ",1);
|
---|
| 39 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.