Last change
on this file since 4075 was 2414, checked in by cmv, 22 years ago |
Exemple pour interface cfortan (CERN) cmv 21/07/2003
|
File size:
980 bytes
|
Line | |
---|
1 | /*
|
---|
2 | * This example demonstrate how to call HIGZ from C.
|
---|
3 | *
|
---|
4 | * For question/problems contact: Heplib.Support@cern.ch
|
---|
5 | *
|
---|
6 | */
|
---|
7 |
|
---|
8 | #include <cfortran.h>
|
---|
9 | #include <packlib.h>
|
---|
10 | #include <higz.h>
|
---|
11 |
|
---|
12 | #if defined(__hpux) || defined(_IBMR2)
|
---|
13 | # define extname
|
---|
14 | #endif
|
---|
15 |
|
---|
16 | #define PAWC_SIZE 50000
|
---|
17 |
|
---|
18 | typedef struct { float PAW[PAWC_SIZE]; } PAWC_DEF;
|
---|
19 | #define PAWC COMMON_BLOCK(PAWC,pawc)
|
---|
20 | COMMON_BLOCK_DEF(PAWC_DEF,PAWC);
|
---|
21 |
|
---|
22 | main()
|
---|
23 | {
|
---|
24 | int itype,istat;
|
---|
25 | char c;
|
---|
26 | /*
|
---|
27 | * Initialisation
|
---|
28 | */
|
---|
29 | MZEBRA(-3);
|
---|
30 | MZPAW(PAWC_SIZE," ");
|
---|
31 | IGINIT(0);
|
---|
32 | IGWKTY(itype);
|
---|
33 | IGSSE(6, itype);
|
---|
34 | /*
|
---|
35 | * Some simple drawing
|
---|
36 | */
|
---|
37 | KUOPEN(77,"chigz-example.ps","NEW",istat);
|
---|
38 | IGMETA(77,-111);
|
---|
39 | IGRNG(21., 21.);
|
---|
40 | IGBOX(1.0, 20.0, 1.0, 20.0);
|
---|
41 | IGBOX(2.0, 19.0, 2.0, 19.0);
|
---|
42 | IGBOX(3.0, 18.0, 3.0, 18.0);
|
---|
43 | IGBOX(4.0, 17.0, 4.0, 17.0);
|
---|
44 | IGSET("TXAL",23.);
|
---|
45 | IGSET("CHHE",0.5);
|
---|
46 | ITX (10.5,10.5,"HIGZ called from a C program");
|
---|
47 | IGTERM();
|
---|
48 | IGMETA(999,0);
|
---|
49 | KUCLOS(77," ",1);
|
---|
50 | c = getchar();
|
---|
51 | IGEND();
|
---|
52 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.