/*Translated by FOR_C, v3.4.2 (-), on 07/09/115 at 08:33:12 */ /*FOR_C Options SET: ftn=u io=c no=p op=aimnv pf=,p_dprpl1 s=dbov str=l x=f - prototypes */ #include #include "fcrt.h" #include #include #include "p_dprpl1.h" /*atc program DRDPRPL1 *>> 1996-06-27 DRDPRPL1 Krogh Special code for C conversion. *>> 1994-10-19 DRDPRPL1 Krogh Changes to use M77CON *>> 1992-02-14 DRDPRPL1 CLL * ------------------------------------------------------------------ *--D replaces "?": DR?PRPL1, ?PRPL1 * ------------------------------------------------------------------ */ /* PARAMETER translations */ #define ALPHA 0.15e0 #define BETA 0.015e0 #define DX 1.0e0 #define NP 101 /* end of PARAMETER translations */ int main( ) { long int i; double x[NP], xt, y[NP]; /* OFFSET Vectors w/subscript range: 1 to dimension */ double *const X = &x[0] - 1; double *const Y = &y[0] - 1; /* end of OFFSET VECTORS */ long int ierr, line; char image[45][111], image2[45][80]; xt = -36.0e0; /* character IMAGE(NLMAX)*(NCMAX) * ------------------------------------------------------------------ */ for (i = 1; i <= NP; i++) { X[i] = xt; Y[i] = X[i]*sin( ALPHA*X[i] + BETA ); xt += DX; } /*++ Code for ~.C. is inactive * call DPRPL1(X,Y,NP, * * 'Demo of DPRPL1 with NLINES = 45 and NCHARS = 110', * * 'X VALUES','Y VALUES', 45, 110, IMAGE, IERR) * print'(1x,a)',IMAGE * print'(1x/1x)' *c * call DPRPL1(X,Y,NP, * * 'Demo of DPRPL1 with NLINES = 22 and NCHARS = 79', * * 'X VALUES','Y VALUES', 22, 79, IMAGE, IERR) * print'(1x,a)',(IMAGE(LINE)(1:79), LINE = 1,22) *++ Code for .C. is active */ dprpl1( x,y,NP,"Demo of DPRPL1 with NLINES = 45 and NCHARS = 110", "X VALUES","Y VALUES",45,111,(byte*)image,&ierr ); for(line=0; line < 45; line++) printf("\n%111.111s", image[line]); printf("\n"); printf(" \n \n"); dprpl1( x,y,NP,"Demo of DPRPL1 with NLINES = 22 and NCHARS = 79", "X VALUES","Y VALUES",22,80,(byte*)image2,&ierr ); printf(" "); for (line = 0; line < 22; line++) printf("\n%80.80s", image2[line]); printf("\n"); exit(0); /*++ End */ } /* end of function */