Hi Rob, So I gather that the example in its original state did not compile on Windows? I would be somewhat surprised that there are still C compilers in use that are not C99 compliant.
Many thanks for your suggestions, and I will follow your advice on using the github process. Cheers, Ron. > On 8 Dec 2016, at 3:08 pm, sisyph...@optusnet.com.au wrote: > > The "use Inline C => Config => ..." line can be removed if you rewrite the > __C__ section as: > > __DATA__ > __C__ > #define N_MP 4 > > void CalcSurfaceHeights() { > double x[N_MP], y[N_MP], z; > int ix; > char *mesh_data = SvPV_nolen(get_sv("main::mesh_data", 0)); > > sscanf(mesh_data, "MESH-POINTS %lf%lf%lf%lf%lf%lf%lf%lf", > x, y, x+1, y+1, x+2, y+2, x+3, y+3); > > for (ix=0; ix < N_MP; ix++) { > z = 0.5*( sin(x[ix]) + sin(y[ix]) ); > > printf("Surface-Height: %6.3f Mesh-Point: %6.2f, %6.2f\n", > z, x[ix], y[ix]); > } > } > > All I've done is move the declaration of "ix" from the for() loop to the > declaration section at the beginning of CalcSurfaceHeights(). > This then enables the code to compile using compilers (such as Microsoft > compilers) that are not C99-compliant. > > This mailing list is very quiet these days and I think your request will > probably fall "through the cracks" unless you submit it as a github "Issue" > or a github pull request. > > Cheers, > Rob >