Changeset 8 in dev for BasicCompiler32/NumOpe.cpp


Ignore:
Timestamp:
Dec 7, 2006, 3:10:05 AM (17 years ago)
Author:
dai_9181
Message:

Constステートメントで定数変数を宣言できるように改良。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler32/NumOpe.cpp

    r3 r8  
    438438                    //////////////
    439439
    440                     i3=GetConstValue(term,&dbl,temporary,&index_stack[sp]);
    441                     if(i3!=-1){
     440                    i3 = CDBConst::obj.GetType(term);
     441                    if(i3){
    442442                        type[sp]=i3;
    443443                        if(IsRealNumberType(i3)){
    444444                            //実数
     445                            double dbl = CDBConst::obj.GetDoubleData(term);
    445446                            memcpy(&i64data,&dbl,sizeof(double));
    446447                            goto Literal;
     
    448449                        else if(IsWholeNumberType(i3)){
    449450                            //整数
    450                             i64data=(_int64)dbl;
     451                            i64data = CDBConst::obj.GetWholeData(term);
    451452                            goto Literal;
    452453                        }
    453                         else if(Is64Type(i3)){
    454                             //64ビット整数値
    455                             memcpy(&i64data,&dbl,sizeof(_int64));
    456                             goto Literal;
    457                         }
    458                         else if(i3==DEF_STRING){
     454                        /*else if(i3==DEF_STRING){
    459455                            //リテラル文字列
    460456
     
    464460                            memcpy(term,temporary,i3);
    465461                            goto StrLiteral;
    466                         }
     462                        }*/
    467463                        else{
    468464                            SetError(300,NULL,cp);
Note: See TracChangeset for help on using the changeset viewer.