Changeset 15 in dev for BasicCompiler_Common/calculation.cpp
- Timestamp:
- Dec 11, 2006, 3:07:59 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/calculation.cpp
r14 r15 10 10 _int64 i64stack[255]; 11 11 12 bool IsNumberTopChar(c har *buffer){12 bool IsNumberTopChar(const char *buffer){ 13 13 int c = buffer[0]; 14 14 if('0' <= c && c <= '9') return true; 15 if( buffer[0]== '&' && (buffer[1] == 'h' || buffer[1] == 'H' || buffer[1] == 'o' || buffer[1] == 'O')) return true;15 if(c == '&' && (buffer[1] == 'h' || buffer[1] == 'H' || buffer[1] == 'o' || buffer[1] == 'O')) return true; 16 16 17 17 return false; 18 18 } 19 bool IsNumberChar(c har c){19 bool IsNumberChar(const char c){ 20 20 if('0' <= c && c <= '9') return true; 21 21 if('a' <= c && c <= 'f') return true; 22 22 if('A' <= c && c <= 'F') return true; 23 if(c=='.' || c=='e'||c=='E') return true; 23 24 24 25 return false; 25 26 } 26 BOOL IsJudgMark(c har *Command,int p){27 BOOL IsJudgMark(const char *Command,int p){ 27 28 if(Command[p]==1){ 28 29 if(Command[p+1]==ESC_AND) return 1; … … 33 34 return 0; 34 35 } 35 BOOL IsNumCalcMark(c har *Command,int p){36 BOOL IsNumCalcMark(const char *Command,int p){ 36 37 if(Command[p]=='^'||Command[p]=='*'||Command[p]=='/'||Command[p]=='\\'|| 37 38 (Command[p]==1&&Command[p+1]==ESC_MOD)||Command[p]=='+'||Command[p]=='-'|| … … 41 42 return 0; 42 43 } 43 BOOL IsNumCalcMark_Back(c har *Command,int p){44 BOOL IsNumCalcMark_Back(const char *Command,int p){ 44 45 if(p==0){ 45 46 if(Command[p]=='^'||Command[p]=='*'||Command[p]=='/'||Command[p]=='\\'|| … … 56 57 return 0; 57 58 } 58 BOOL IsStrCalcMark(c har c){59 BOOL IsStrCalcMark(const char c){ 59 60 if(c=='+'||c=='&') return 1; 60 61 return 0; 61 62 } 62 BOOL IsExponent(c har *Command,int p){63 BOOL IsExponent(const char *Command,int p){ 63 64 int i,sw; 64 65 for(i=p-2,sw=FALSE;i>=0;i--){ … … 388 389 } 389 390 390 int StaticCalculation(bool enableerror, c har *Command,int BaseType,_int64 *pi64data,LONG_PTR *plpIndex,BOOL bDebuggingWatchList){391 int StaticCalculation(bool enableerror, const char *Command,int BaseType,_int64 *pi64data,LONG_PTR *plpIndex,BOOL bDebuggingWatchList){ 391 392 extern HANDLE hHeap; 392 393 extern int cp; … … 1346 1347 } 1347 1348 1348 BYTE GetCalcId(c har *Command,int *pi){1349 BYTE GetCalcId(const char *Command,int *pi){ 1349 1350 *pi=0; 1350 1351 … … 1400 1401 return 0; 1401 1402 } 1402 BOOL GetNumOpeElements(c har *Command,int *pnum,1403 BOOL GetNumOpeElements(const char *Command,int *pnum, 1403 1404 char *values[255],long calc[255],long stack[255]){ 1404 1405 extern int cp;
Note:
See TracChangeset
for help on using the changeset viewer.