|
5#
楼主 |
发表于 2006-7-21 20:56:01
|
只看该作者
我修改后的代码:
myFile = "output.txt";
for(t=1;t<10;t++)
{
file_open(myFile, FO_MODE_APPEND);
file_printf(myFile, "%s","\t" & t);
}
file_printf(myFile,"\r\n");
file_close(myFile);
for(i=1;i<10;i++)
{
check=file_open(myFile, FO_MODE_APPEND);
file_printf(myFile, "%s",i);
for(j=1;j<=i;j++)
{
if(check == E_OK)
{
result=i*j;
file_printf(myFile, "%s","\t" & i & "*" j & "=" & result);
}
else
{
report_msg("file_open failed with error " & check);
}
}
file_printf(myFile,"\r\n");
file_close(myFile);
} |
|