?? errorp.c
字號:
/*********************************************************************
* Error Processing
*********************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include "GetData.h"
#include "types.h"
/*out**********************************************************
* Error messages
**************************************************************/
void Error(short n, char *s1, char *s2)
{
static char Messages=0; /* 記錄系統出錯的次數 */
printf("\nERROR: ");
switch(n) {
case 0:
printf("cannot open file %s%s\n", s1, s2);
exit(1);
case 1:
printf("':' expected after attribute name %s\n", s1);
break;
case 2:
printf("unexpected eof while reading attribute %s\n", s1);
break;
case 3:
printf("attribute %s has only one value\n", s1);
break;
case 4:
printf("case %d's value of '%s' for attribute %s is illegal\n", ItemNum+1, s2, s1);
break;
case 5:
printf("case %d's class of '%s' is illegal\n", ItemNum+1, s2);
}
if ( ++Messages > 10 ) {
printf("Error limit exceeded\n");
exit(1);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -