Assignment of the curve point table from the user program

In some cases, the values of the curve points are not read in from a file, but assigned directly in the user program. The program code that assigns the values contained in the example file InterpolationFile.txt to a curve point table for spline interpolation directly in the user program looks as follows, for example. Here, _stPointsListSpline is defined as a variable of type ST_PointsListSpline:

 

_stPointsListSpline.uiNumberOfPoints := 7;

_stPointsListSpline.astPoints[0].lrX := 0.0;

_stPointsListSpline.astPoints[0].lrY := 0.0;

_stPointsListSpline.astPoints[1].lrX := 40.0;

_stPointsListSpline.astPoints[1].lrY := 10.0;

_stPointsListSpline.astPoints[2].lrX := 140.0;

_stPointsListSpline.astPoints[2].lrY := 90.0;

_stPointsListSpline.astPoints[3].lrX := 180.0;

_stPointsListSpline.astPoints[3].lrY := 100.0;

_stPointsListSpline.astPoints[4].lrX := 220.0;

_stPointsListSpline.astPoints[4].lrY := 90.0;

_stPointsListSpline.astPoints[5].lrX := 320.0;

_stPointsListSpline.astPoints[5].lrY := 10.0;

_stPointsListSpline.astPoints[6].lrX := 360.0;

_stPointsListSpline.astPoints[6].lrY := 0.0;