Changeset 7 in dev for BasicCompiler_Common/calculation.cpp
- Timestamp:
- Dec 7, 2006, 3:09:44 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/calculation.cpp
r5 r7 627 627 //定数 628 628 ///////// 629 double dbl;630 629 StrPtr[pnum]=0; 631 type[pnum] =GetConstValue(Parms,&dbl,temporary,&before_index[pnum]);632 if(type[pnum] !=-1){630 type[pnum] = CDBConst::obj.GetType(Parms); 631 if(type[pnum]){ 633 632 if(IsRealNumberType(type[pnum])){ 634 633 //実数型 635 nums[pnum]=dbl; 636 } 637 else if(Is64Type(type[pnum])){ 638 //64ビット整数 639 memcpy(&i64nums[pnum],&dbl,sizeof(_int64)); 634 nums[pnum] = CDBConst::obj.GetDoubleData(Parms); 640 635 } 641 636 else if(IsWholeNumberType(type[pnum])){ 642 637 //整数 643 i64nums[pnum] =(_int64)dbl;638 i64nums[pnum] = CDBConst::obj.GetWholeData(Parms); 644 639 } 645 else if(type[pnum]==DEF_STRING){640 /* else if(type[pnum]==DEF_STRING){ 646 641 //リテラル文字列 647 642 … … 652 647 memcpy(Parms,temporary,(int)nums[pnum]); 653 648 goto StrLiteral; 654 } 649 }*/ 655 650 else{ 656 651 //エラー … … 671 666 if(bDebuggingWatchList) return -1; 672 667 //エラー 673 if(enableerror) SetError(3 3,NULL,cp);668 if(enableerror) SetError(3,Parms,cp); 674 669 return 0; 675 670 } … … 1204 1199 int IsStrCalculation(char *Command){ 1205 1200 int i,i2,i3,i4,type,PareNum; 1206 double dbl;1207 1201 char temporary[VN_SIZE],temp2[8192]; 1208 1202 … … 1300 1294 1301 1295 //定数 1302 i3 =GetConstValue(Command+i2,&dbl,temporary,0);1296 i3 = CDBConst::obj.GetType(Command+i2); 1303 1297 if(i3==DEF_STRING) return 1; //文字列 1304 if(i3 !=-1) return 0; //数値1298 if(i3) return 0; //数値 1305 1299 1306 1300 //変数
Note:
See TracChangeset
for help on using the changeset viewer.