Index: BasicCompiler32/increment.cpp
===================================================================
--- BasicCompiler32/increment.cpp	(revision 64)
+++ BasicCompiler32/increment.cpp	(revision 75)
@@ -3,8 +3,4 @@
 
 void IncDec(int idCalc, char *lpszLeft, char *lpszRight){
-	int VarType;
-	LONG_PTR lpVarIndex;
-	RELATIVE_VAR VarRelativeVar;
-
 
 	///////////////////////////
@@ -12,9 +8,10 @@
 	///////////////////////////
 
+	RELATIVE_VAR VarRelativeVar;
+	Type varType;
 	if(!GetVarOffsetReadWrite(
 		lpszLeft,
-		&VarType,
 		&VarRelativeVar,
-		&lpVarIndex)) return;
+		varType)) return;
 
 	if(IsUse_ecx(&VarRelativeVar)){
@@ -28,15 +25,15 @@
 	///////////////////////////////////
 
-	if(IsRealNumberType(VarType)){
+	if( varType.IsReal() ){
 		//実数
-		SetReg_RealVariable(VarType,&VarRelativeVar);
+		SetReg_RealVariable(varType.GetBasicType(),&VarRelativeVar);
 	}
 	else{
 		//整数
-		SetReg_WholeVariable(VarType,&VarRelativeVar,REG_EAX);
+		SetReg_WholeVariable(varType.GetBasicType(),&VarRelativeVar,REG_EAX);
 	}
 
 	
-	if(IsWholeNumberType(VarType)&&lstrcmp(lpszRight,"1")==0&&
+	if(varType.IsWhole()&&lstrcmp(lpszRight,"1")==0&&
 		(idCalc==CALC_ADDITION||idCalc==CALC_SUBTRACTION)){
 		////////////////////////////////////////////
@@ -44,5 +41,5 @@
 		////////////////////////////////////////////
 
-		if(Is64Type(VarType)){
+		if( varType.Is64() ){
 			if(idCalc==CALC_ADDITION){
 				//64ビット インクリメント
@@ -80,20 +77,19 @@
 		op_push(REG_ECX);
 
-
-		if(VarType==DEF_DOUBLE){
+		if( varType.IsDouble() ){
 			//sub esp,8
 			op_sub_esp(8);
 
 			//fstp qword ptr[esp]
-			op_fstp_basereg(VarType,REG_ESP);
-		}
-		else if(VarType==DEF_SINGLE){
+			op_fstp_basereg(varType.GetBasicType(),REG_ESP);
+		}
+		else if( varType.IsSingle() ){
 			//sub esp,4
 			op_sub_esp(4);
 
 			//fstp dword ptr[esp]
-			op_fstp_basereg(VarType,REG_ESP);
-		}
-		else if(Is64Type(VarType)){
+			op_fstp_basereg(varType.GetBasicType(),REG_ESP);
+		}
+		else if( varType.Is64() ){
 			//push edx
 			op_push(REG_EDX);
@@ -107,70 +103,72 @@
 		}
 
-		int CalcType;
-		CalcType=NumOpe(lpszRight,VarType,lpVarIndex,0);
-
-		if(VarType==DEF_DOUBLE)			ChangeTypeToDouble(CalcType);
-		else if(VarType==DEF_SINGLE)	ChangeTypeToSingle(CalcType);
-		else ChangeTypeToWhole(CalcType,VarType);
-
-		int type[255],sp;
+		Type calcType;
+		if( !NumOpe(lpszRight,varType,calcType) ){
+			return;
+		}
+
+		if( varType.IsDouble() )		ChangeTypeToDouble(calcType.GetBasicType());
+		else if( varType.IsSingle() )	ChangeTypeToSingle(calcType.GetBasicType());
+		else ChangeTypeToWhole(calcType.GetBasicType(),varType.GetBasicType());
+
+		int type_stack[255],sp;
 		LONG_PTR index_stack[255];
-		type[0]=VarType;
-		type[1]=VarType;
-		index_stack[0]=lpVarIndex;
-		index_stack[1]=lpVarIndex;
+		type_stack[0]=varType.GetBasicType();
+		type_stack[1]=varType.GetBasicType();
+		index_stack[0]=varType.GetIndex();
+		index_stack[1]=varType.GetIndex();
 		sp=2;
 
 		switch(idCalc){
 			case CALC_XOR:
-				Calc_Xor(type,index_stack,&sp);
+				Calc_Xor(type_stack,index_stack,&sp);
 				break;
 			case CALC_OR:
-				Calc_Or(type,index_stack,&sp);
+				Calc_Or(type_stack,index_stack,&sp);
 				break;
 			case CALC_AND:
-				Calc_And(type,index_stack,&sp);
+				Calc_And(type_stack,index_stack,&sp);
 				break;
 			case CALC_SHL:
-				Calc_SHL(type,&sp);
+				Calc_SHL(type_stack,&sp);
 				break;
 			case CALC_SHR:
-				Calc_SHR(type,&sp);
+				Calc_SHR(type_stack,&sp);
 				break;
 			case CALC_ADDITION:
 			case CALC_SUBTRACTION:
 			case CALC_PRODUCT:
-				CalcTwoTerm_Arithmetic(idCalc,type,index_stack,&sp);
+				CalcTwoTerm_Arithmetic(idCalc,type_stack,index_stack,&sp);
 				break;
 			case CALC_MOD:
-				Calc_Mod(type,&sp);
+				Calc_Mod(type_stack,&sp);
 				break;
 			case CALC_QUOTIENT:
-				Calc_Divide(type,&sp,VarType);
+				Calc_Divide(type_stack,&sp,varType.GetBasicType());
 				break;
 			case CALC_INTQUOTIENT:
-				Calc_IntDivide(type,index_stack,&sp);
+				Calc_IntDivide(type_stack,index_stack,&sp);
 				break;
 			case CALC_POWER:
-				Calc_Power(type,&sp);
-				break;
-		}
-
-
-		if(VarType==DEF_DOUBLE){
+				Calc_Power(type_stack,&sp);
+				break;
+		}
+
+
+		if( varType.IsDouble() ){
 			//fld qword ptr[esp]
-			op_fld_basereg(VarType,REG_ESP);
+			op_fld_basereg(varType.GetBasicType(),REG_ESP);
 
 			//add esp,8
 			op_add_esp(8);
 		}
-		else if(VarType==DEF_SINGLE){
+		else if( varType.IsSingle() ){
 			//fld dword ptr[esp]
-			op_fld_basereg(VarType,REG_ESP);
+			op_fld_basereg(varType.GetBasicType(),REG_ESP);
 
 			//add esp,4
 			op_add_esp(4);
 		}
-		else if(Is64Type(VarType)){
+		else if( varType.Is64() ){
 			//pop eax
 			op_pop(REG_EAX);
@@ -200,4 +198,4 @@
 	}
 
-	SetVariableFromEax(VarType,VarType,&VarRelativeVar);
+	SetVariableFromEax(varType.GetBasicType(),varType.GetBasicType(),&VarRelativeVar);
 }
