Changeset 36 in dev for BasicCompiler_Common/Variable.cpp


Ignore:
Timestamp:
Jan 20, 2007, 4:55:26 AM (18 years ago)
Author:
dai_9181
Message:

Boolean型に対応。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler_Common/Variable.cpp

    r34 r36  
    5656}
    5757BOOL IsWholeNumberType(int type){
    58     return (IsNaturalWholeNumberType(type)||IsPtrType(type));
     58    return (
     59        IsNaturalWholeNumberType(type)
     60        || IsPtrType(type)
     61        || type == DEF_BOOLEAN
     62        );
    5963}
    6064BOOL IsRealNumberType(int type){
     
    132136    else if(type==DEF_INTEGER||type==DEF_WORD)
    133137        return sizeof(WORD);
    134     else if(type==DEF_CHAR||type==DEF_BYTE)
     138    else if(type==DEF_CHAR||type==DEF_BYTE || type == DEF_BOOLEAN)
    135139        return sizeof(BYTE);
    136140
     
    187191    else if(lstrcmpi(TypeName,"Double")==0)     return DEF_DOUBLE;
    188192
     193    //bool型
     194    else if( lstrcmpi( TypeName, "Boolean" ) == 0 ) return DEF_BOOLEAN;
     195
    189196    //ポインタ型
    190197    //※VoidPtr型以外のポインタ型はTypeDef宣言により定義される
     
    253260    else if(type==DEF_SINGLE)       lstrcpy(name,"Single");
    254261    else if(type==DEF_DOUBLE)       lstrcpy(name,"Double");
     262
     263    //bool型
     264    else if(type==DEF_BOOLEAN)      lstrcpy(name,"Boolean");
    255265
    256266    //オブジェクト
Note: See TracChangeset for help on using the changeset viewer.