< >参考以下代码</P>
< >int CVICALLBACK readdata (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
long size;
int datanum;
double *Data;
switch (event)
{
case EVENT_COMMIT:
GetFileSize("E:\\results.txt",&size);
datanum=size/12; //这个是文件中的数据个数,可以推算
Data=malloc(datanum*sizeof(double));
FileToArray ("E:\\results.txt", Data, VAL_DOUBLE, datanum, 1,
VAL_GROUPS_TOGETHER, VAL_GROUPS_AS_COLUMNS, VAL_ASCII);
break;
}
return 0;
}</P>[em01][em01]
[此贴子已经被作者于2005-9-15 10:04:19编辑过]
|