Changeset 62 in dev for BasicCompiler32/Compile_Calc.cpp


Ignore:
Timestamp:
Feb 22, 2007, 3:57:56 AM (18 years ago)
Author:
dai_9181
Message:

グローバル変数に対してByRefを指定できるようにした

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BasicCompiler32/Compile_Calc.cpp

    r55 r62  
    656656
    657657
    658     if( VarType == DEF_OBJECT && VarRelativeVar.dwKind == VAR_REFLOCAL ){
     658    if( VarType == DEF_OBJECT
     659        && (VarRelativeVar.dwKind == VAR_REFLOCAL || VarRelativeVar.dwKind == VAR_REFGLOBAL ) ){
    659660        // 参照型オブジェクトへの代入(初期化)はポインタ変数と同様の処理に値する
    660661        PTR_LEVEL_UP( VarType );
    661662
    662         VarRelativeVar.dwKind = VAR_LOCAL;
     663        if( VarRelativeVar.dwKind == VAR_REFGLOBAL ){
     664            VarRelativeVar.dwKind = VAR_GLOBAL;
     665        }
     666        else if( VarRelativeVar.dwKind == VAR_REFLOCAL ){
     667            VarRelativeVar.dwKind = VAR_LOCAL;
     668        }
    663669
    664670        if( CalcType == DEF_OBJECT ){
Note: See TracChangeset for help on using the changeset viewer.