Changeset 9 in dev for BasicCompiler64/NumOpe.cpp


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler64/NumOpe.cpp

    r3 r9  
    490490                    //////////////
    491491
    492                     i3=GetConstValue(term,&dbl,temporary,&index_stack[sp]);
    493                     if(i3!=-1){
    494                         type[sp]=i3;
     492                    i3 = CDBConst::obj.GetType(term);
     493                    if(i3){
     494                        type[sp] = i3;
    495495                        if(IsRealNumberType(i3)){
    496496                            //実数
     497                            double dbl = CDBConst::obj.GetDoubleData(term);
    497498                            memcpy(&i64data,&dbl,sizeof(double));
    498499                            goto Literal;
     
    500501                        else if(IsWholeNumberType(i3)){
    501502                            //整数
    502                             i64data=(_int64)dbl;
     503                            i64data = CDBConst::obj.GetWholeData(term);
    503504                            goto Literal;
    504505                        }
    505                         else if(Is64Type(i3)){
    506                             //64ビット整数値
    507                             memcpy(&i64data,&dbl,sizeof(_int64));
    508                             goto Literal;
    509                         }
    510                         else if(i3==DEF_STRING){
     506                        /*else if(i3==DEF_STRING){
    511507                            //リテラル文字列
    512508
     
    516512                            memcpy(term,temporary,i3);
    517513                            goto StrLiteral;
    518                         }
     514                        }*/
    519515                        else{
    520516                            SetError(1,NULL,0);
     
    522518                        }
    523519                    }
     520
    524521
    525522
Note: See TracChangeset for help on using the changeset viewer.