WINCC 数组左移右移,更新数据

参考地址://https://blog.csdn.net/weixin_43742643/article/details/102403823
//右移
for (i = 0; i < data_n-1; i++) 
{
	data_y[i] = data_y[i+1];
	data_x[i] = i+1;
	printf("%f,%f\r\n", data_x[i],data_y[i]);
}
data_y[data_n-1] = value;


//左移
for(i = data_n-1;i>=1;i--)
{
	data_y[i] = data_y[i-1];
	data_x[i-1] = i-1;
	printf("%f,%f\r\n", data_x[i],data_y[i]);
}
data_y[0] = value;
//数组反转
for(i=0;i

你可能感兴趣的:(WinCC,语句总结,WINCC)