Index: BasicCompiler32/Compile_Var.cpp
===================================================================
--- BasicCompiler32/Compile_Var.cpp	(revision 138)
+++ BasicCompiler32/Compile_Var.cpp	(revision 140)
@@ -158,6 +158,4 @@
 }
 bool _member_offset(bool isErrorEnabled, bool isWriteAccess, const CClass &objClass, const char *member, RELATIVE_VAR *pRelativeVar, Type &resultType, BOOL bPrivateAccess){
-	int i;
-
 
 	//////////////////////////////////////
@@ -178,11 +176,12 @@
 	////////////////////////////
 
-	int offset = objClass.GetMemberOffset( VarName, &i );
-	if(i==objClass.iMemberNum){
+	int memberIndex;
+	int offset = objClass.GetMemberOffset( VarName, &memberIndex );
+	if(memberIndex==objClass.GetDynamicMembers().size()){
 		if(isErrorEnabled) SetError(103,VarName,cp);
 		return false;
 	}
 
-	CMember *pMember=objClass.ppobj_Member[i];
+	CMember *pMember=objClass.GetDynamicMembers()[memberIndex];
 
 
@@ -351,5 +350,4 @@
 
 bool GetVarOffset(bool isErrorEnabled,bool isWriteAccess,const char *NameBuffer,RELATIVE_VAR *pRelativeVar,Type &resultType,int *pss){
-	int i;
 	char variable[VN_SIZE];
 
@@ -387,5 +385,5 @@
 		//////////////////
 
-		const Variable *pVar = UserProc::CompilingUserProc().localVars.BackSearch( VarName );
+		const Variable *pVar = UserProc::CompilingUserProc().localVars.BackSearch( Symbol( VarName ) );
 		if( pVar ){
 			//ポインタ変数の場合
@@ -444,10 +442,12 @@
 			//クラス内メンバを参照するとき（通常）
 
-			for(i=0;i<pobj_CompilingClass->iMemberNum;i++){
-				if( pobj_CompilingClass->ppobj_Member[i]->GetName() == VarName ){
+			bool isFound = false;
+			BOOST_FOREACH( CMember *pMember, pobj_CompilingClass->GetDynamicMembers() ){
+				if( pMember->GetName() == VarName ){
+					isFound = true;
 					break;
 				}
 			}
-			if(i==pobj_CompilingClass->iMemberNum) goto NonClassMember;
+			if( !isFound ) goto NonClassMember;
 		}
 
@@ -494,5 +494,5 @@
 			GetNowStaticVarFullName(VarName,temporary);
 
-			pVar = globalVars.Find( temporary );
+			pVar = globalVars.Find( Symbol( temporary ) );
 			if( pVar ){
 				goto GlobalOk;
@@ -525,5 +525,5 @@
 			char temp2[VN_SIZE];
 			sprintf(temp2,"%s.%s",VarName,temporary);
-			pVar = globalVars.Find( temp2 );
+			pVar = globalVars.Find( Symbol( temp2 ) );
 			if( pVar ){
 				lstrcpy(member,tempMember);
@@ -537,5 +537,5 @@
 			char temp2[VN_SIZE];
 			sprintf(temp2,"%s.%s",pobj_CompilingClass->GetName().c_str(),VarName);
-			pVar = globalVars.Find( temp2 );
+			pVar = globalVars.Find( Symbol( temp2 ) );
 			if( pVar ){
 				goto GlobalOk;
@@ -547,5 +547,5 @@
 		/////////////////////
 
-		pVar = globalVars.BackSearch( VarName );
+		pVar = globalVars.BackSearch( Symbol( VarName ) );
 		if( pVar ){
 			goto GlobalOk;
@@ -716,5 +716,5 @@
 bool SetInitGlobalData(int offset,const Type &type,const int *SubScripts,const char *lpszInitBuf){
 	extern BYTE *initGlobalBuf;
-	int i,i2,i3;
+	int i2,i3;
 	char temporary[VN_SIZE];
 	char InitBuf[VN_SIZE];
@@ -729,5 +729,5 @@
 		if(SubScripts[0]!=-1){
 			typeSize*=JumpSubScripts(SubScripts+1);
-			i=0;
+			int i=0;
 			i2=0;
 			while(1){
@@ -751,19 +751,19 @@
 			const CClass &objClass = type.GetClass();
 
-			for(i=0,i2=0;i2<objClass.iMemberNum;i2++){
+			int i = 0;
+			BOOST_FOREACH( CMember *pMember, objClass.GetDynamicMembers() ){
+				if(InitBuf[i]=='\0'){
+					SetError(41,0,cp);
+					return false;
+				}
+
 				i=GetOneParameter(InitBuf,i,temporary);
 
-				i3=objClass.GetMemberOffset( objClass.ppobj_Member[i2]->GetName().c_str(), NULL );
+				i3=objClass.GetMemberOffset( pMember->GetName().c_str(), NULL );
 
 				if(!SetInitGlobalData(offset+i3,
-					objClass.ppobj_Member[i2]->GetType(),
-					objClass.ppobj_Member[i2]->SubScripts,
+					pMember->GetType(),
+					pMember->SubScripts,
 					temporary)) return false;
-
-				if(InitBuf[i]=='\0') break;
-			}
-			if(i2+1!=objClass.iMemberNum){
-				SetError(41,0,cp);
-				return false;
 			}
 			return true;
@@ -889,19 +889,21 @@
 			const CClass &objClass = type.GetClass();
 
-			for(i=0,i2=0;i2<objClass.iMemberNum;i2++){
+			int i = 0;
+			BOOST_FOREACH( CMember *pMember, objClass.GetDynamicMembers() ){
+				if(InitBuf[i]=='\0'){
+					SetError(41,0,cp);
+					return false;
+				}
+
 				i=GetOneParameter(InitBuf,i,temporary);
 
-				i3=objClass.GetMemberOffset( objClass.ppobj_Member[i2]->GetName().c_str(), NULL );
+				i3=objClass.GetMemberOffset( pMember->GetName().c_str(), NULL );
 
 				if(!InitLocalVar(offset+i3,
-					objClass.ppobj_Member[i2]->GetType(),
-					objClass.ppobj_Member[i2]->SubScripts,
+					pMember->GetType(),
+					pMember->SubScripts,
 					temporary)) return false;
 
 				if(InitBuf[i]=='\0') break;
-			}
-			if(i2+1!=objClass.iMemberNum){
-				SetError(41,0,cp);
-				return 0;
 			}
 			return true;
@@ -1078,5 +1080,5 @@
 		/////////////////
 
-		if( UserProc::CompilingUserProc().localVars.DuplicateCheck( VarName ) ){
+		if( UserProc::CompilingUserProc().localVars.DuplicateCheck( Symbol( VarName ) ) ){
 			//２重定義のエラー
 			SetError(15,VarName,cp);
