Index: BasicCompiler32/Compile_Var.cpp
===================================================================
--- BasicCompiler32/Compile_Var.cpp	(revision 73)
+++ BasicCompiler32/Compile_Var.cpp	(revision 75)
@@ -11,22 +11,21 @@
 int AllLocalVarSize;
 
-void SetRelativeOffset(int *pType,LONG_PTR lpIndex,RELATIVE_VAR *pRelativeVar,char *lpPtrOffset){
-	int i2;
-
+void SetRelativeOffset( Type &resultType, RELATIVE_VAR *pRelativeVar,const char *lpPtrOffset){
 	PushLongVariable(pRelativeVar);
 
-	i2=NumOpe(lpPtrOffset,0,0,0);
-	ChangeTypeToLong(i2);
+	Type type;
+	NumOpe( lpPtrOffset, Type(), type );
+	ChangeTypeToLong( type.GetBasicType() );
 
 	//pop ebx
 	op_pop(REG_EBX);
 
-	if(PTR_LEVEL(*pType)){
-		*pType = PTR_LEVEL_DOWN( *pType );
-
-		i2=GetTypeSize(*pType,lpIndex);
-		if(i2>=2){
+	if( resultType.PtrLevel() ){
+		resultType.PtrLevelDown();
+
+		int typeSize = resultType.GetSize();
+		if(typeSize>=2){
 			//imul ebx,i2
-			op_imul_RV( REG_EBX, i2 );
+			op_imul_RV( REG_EBX, typeSize );
 		}
 	}
@@ -58,7 +57,7 @@
 	}
 }
-BOOL GetArrayOffset(int *SubScripts,char *array,int type,LONG_PTR lpIndex){
+bool GetArrayOffset(const int *SubScripts,char *array, const Type &type){
 	extern HANDLE hHeap;
-	int i,i2,i3,i4,TypeSize;
+	int i,i2,i3,i4;
 	char temporary[VN_SIZE],*pParm[MAX_PARMS];
 
@@ -110,15 +109,15 @@
 
 	for(i=i3-1;i>=0;i--){
-		TYPEINFO TypeInfo;
+		Type tempType;
 		BOOL bUseHeap;
-		TypeInfo.type=NumOpe(pParm[i],DEF_LONG,-1,&TypeInfo.u.lpIndex,&bUseHeap);
-		if(TypeInfo.type==DEF_OBJECT){
+		NumOpe( pParm[i], Type( DEF_LONG ), tempType, &bUseHeap );
+		if( tempType.IsObject() ){
 			//キャスト演算子のオーバーロードに対応する
 			CallCastOperatorProc(
-				TypeInfo.type,TypeInfo.u.lpIndex,
-				bUseHeap,DEF_LONG,-1);
-			TypeInfo.type=DEF_LONG;
-		}
-		ChangeTypeToLong(TypeInfo.type);
+				tempType,
+				bUseHeap, Type(DEF_LONG) );
+			tempType.SetBasicType( DEF_LONG );
+		}
+		ChangeTypeToLong( tempType.GetBasicType() );
 
 		//pop eax
@@ -144,10 +143,8 @@
 	op_pop(REG_EAX);
 
-	TypeSize=GetTypeSize(type,lpIndex);
-
 	//imul eax,TypeSize
 	OpBuffer[obp++]=(char)0x69;
 	OpBuffer[obp++]=(char)0xC0;
-	*((long *)(OpBuffer+obp))=TypeSize;
+	*((long *)(OpBuffer+obp)) = type.GetSize();
 	obp+=sizeof(long);
 
@@ -161,8 +158,12 @@
 	return 1;
 }
-BOOL GetMemberOffset(bool isErrorEnabled, bool isWriteAccess, CClass *pobj_c, char *member, int *pType, RELATIVE_VAR *pRelativeVar, LONG_PTR *plpNestIndex, BOOL bPrivateAccess){
+bool _member_offset(bool isErrorEnabled, bool isWriteAccess, const CClass &objClass, const char *member, RELATIVE_VAR *pRelativeVar, Type &resultType, BOOL bPrivateAccess){
 	int i;
 
-	//クラス、配列の構成要素を解析する
+
+	//////////////////////////////////////
+	// クラス、配列の構成要素を解析する
+	//////////////////////////////////////
+
 	char VarName[VN_SIZE];		//変数名
 	char array[VN_SIZE];		//第1次配列
@@ -171,5 +172,6 @@
 	CClass::RefType refType;
 	lstrcpy(VarName,member);
-	if(!GetVarFormatString(VarName,array,lpPtrOffset,NestMember,refType)) return 0;
+	if(!GetVarFormatString(VarName,array,lpPtrOffset,NestMember,refType)) return false;
+
 
 	////////////////////////////
@@ -177,18 +179,19 @@
 	////////////////////////////
 
-	int offset=pobj_c->GetMemberOffset( VarName, &i );
-	if(i==pobj_c->iMemberNum){
+	int offset = objClass.GetMemberOffset( VarName, &i );
+	if(i==objClass.iMemberNum){
 		if(isErrorEnabled) SetError(103,VarName,cp);
-		return 0;
-	}
-
-	CMember *pMember=pobj_c->ppobj_Member[i];
+		return false;
+	}
+
+	CMember *pMember=objClass.ppobj_Member[i];
+
 
 	//アクセシビリティをチェック
-	if(pobj_c==pobj_CompilingClass){
+	if(&objClass==pobj_CompilingClass){
 		//同一クラスオブジェクトの場合はプライベートアクセスを容認する
 		if(pMember->dwAccess==ACCESS_NON){
 			if(isErrorEnabled) SetError(107,VarName,cp);
-			return 0;
+			return false;
 		}
 	}
@@ -197,9 +200,9 @@
 			pMember->dwAccess==ACCESS_NON){
 			if(isErrorEnabled) SetError(107,VarName,cp);
-			return 0;
+			return false;
 		}
 		else if(bPrivateAccess==0&&pMember->dwAccess==ACCESS_PROTECTED){
 			if(isErrorEnabled) SetError(108,VarName,cp);
-			return 0;
+			return false;
 		}
 	}
@@ -209,5 +212,5 @@
 	if( pMember->IsConst() &&		//定数メンバである
 		isWriteAccess &&							//書き込みアクセスを要求されている
-		pobj_c->IsCompilingConstructor() == false	//コンストラクタ コンパイル中を除く
+		objClass.IsCompilingConstructor() == false	//コンストラクタ コンパイル中を除く
 		){
 			//Const定義の変数に書き込みアクセスをしようとした場合
@@ -215,9 +218,8 @@
 	}
 
-	*pType=pMember->TypeInfo.type;
-	*plpNestIndex=pMember->TypeInfo.u.lpIndex;
+	resultType = *pMember;
 
 	//ポインタ変数の場合
-	if(IsPtrType(*pType)){
+	if( resultType.IsPointer() ){
 		if(pMember->SubScripts[0]==-1){
 			lstrcpy(lpPtrOffset,array);
@@ -228,5 +230,5 @@
 		if(lpPtrOffset[0]){
 			if(isErrorEnabled) SetError(16,member,cp);
-			return 0;
+			return false;
 		}
 	}
@@ -242,9 +244,10 @@
 	if(array[0]){
 		//配列オフセット
-		if(!GetArrayOffset(pMember->SubScripts,array,*pType,pMember->TypeInfo.u.lpIndex))
+		if(!GetArrayOffset(pMember->SubScripts,array,*pMember)){
 			if(isErrorEnabled) SetError(14,member,cp);
+		}
 	}
 	else if(pMember->SubScripts[0]!=-1){
-		*pType|=FLAG_PTR;
+		resultType.SetBasicType( resultType.GetBasicType() | FLAG_PTR );
 	}
 
@@ -252,27 +255,28 @@
 		//入れ子構造の場合
 
-		if(*pType==DEF_OBJECT || *pType==DEF_STRUCT){
+		if( resultType.IsObject() || resultType.IsStruct() ){
 			if( refType != CClass::Dot ){
 				if(isErrorEnabled) SetError(104,member,cp);
-				return 0;
-			}
-
-			if( *pType==DEF_OBJECT ){
+				return false;
+			}
+
+			if( resultType.IsObject() ){
 				// 参照内容へのポインタを抽出
 				SetRelativeOffset( *pRelativeVar );
 			}
 		}
-		else if(*pType==DEF_PTR_OBJECT||*pType==DEF_PTR_STRUCT){
+		else if( resultType.IsObjectPtr() || resultType.IsStructPtr() ){
 			//構造体ポインタ型メンバ変数
 
 			if(lpPtrOffset[0]){
 				//pObj[n].member
-				if( ( *pType==DEF_PTR_OBJECT||*pType==DEF_PTR_STRUCT )&& refType != CClass::Dot ){
-					if(isErrorEnabled) SetError(104,member,cp);
-					return 0;
+				if( ( resultType.IsObjectPtr() || resultType.IsStructPtr() )
+					&& refType != CClass::Dot ){
+						if(isErrorEnabled) SetError(104,member,cp);
+						return false;
 				}
 
 				//直接参照に切り替え
-				SetRelativeOffset(pType,*plpNestIndex,pRelativeVar,lpPtrOffset);
+				SetRelativeOffset(resultType,pRelativeVar,lpPtrOffset);
 				pRelativeVar->dwKind=VAR_DIRECTMEM;
 
@@ -281,7 +285,8 @@
 			else{
 				//pObj->member
-				if( ( *pType==DEF_PTR_OBJECT||*pType==DEF_PTR_STRUCT )&& refType != CClass::Pointer ){
-					if(isErrorEnabled) SetError(104,member,cp);
-					return 0;
+				if( ( resultType.IsObjectPtr() || resultType.IsStructPtr() )
+					&& refType != CClass::Pointer ){
+						if(isErrorEnabled) SetError(104,member,cp);
+						return false;
 				}
 
@@ -289,5 +294,6 @@
 			}
 		}
-		else if(*pType==MAKE_PTR_TYPE(DEF_OBJECT,2) || *pType==MAKE_PTR_TYPE(DEF_STRUCT,2)){
+		else if( resultType.GetBasicType() == MAKE_PTR_TYPE(DEF_OBJECT,2)
+			|| resultType.GetBasicType() == MAKE_PTR_TYPE(DEF_STRUCT,2)){
 			//構造体ポインタのポインタ型メンバ変数
 
@@ -296,9 +302,9 @@
 				if( refType != CClass::Pointer ){
 					if(isErrorEnabled) SetError(104,member,cp);
-					return 0;
+					return false;
 				}
 
 				//直接参照に切り替え
-				SetRelativeOffset(pType,*plpNestIndex,pRelativeVar,lpPtrOffset);
+				SetRelativeOffset(resultType,pRelativeVar,lpPtrOffset);
 				pRelativeVar->dwKind=VAR_DIRECTMEM;
 
@@ -311,25 +317,24 @@
 			else{
 				if(isErrorEnabled) SetError(104,member,cp);
-				return 0;
-			}
-		}
-
-		if(!GetMemberOffset(
+				return false;
+			}
+		}
+
+		if(!_member_offset(
 			isErrorEnabled,
 			isWriteAccess,
-			pMember->TypeInfo.u.pobj_Class,
+			pMember->GetClass(),
 			NestMember,
-			pType,
 			pRelativeVar,
-			plpNestIndex,
-			0)) return 0;
+			resultType,
+			0)) return false;
 	}
 
 	if(lpPtrOffset[0]){
-		SetRelativeOffset(pType,*plpNestIndex,pRelativeVar,lpPtrOffset);
+		SetRelativeOffset(resultType,pRelativeVar,lpPtrOffset);
 		pRelativeVar->dwKind=VAR_DIRECTMEM;
 	}
 
-	return 1;
+	return true;
 }
 void GetWithName(char *buffer){
@@ -355,8 +360,6 @@
 }
 
-BOOL GetVarOffset(bool isErrorEnabled, bool isWriteAccess, const char *NameBuffer, int *pType, RELATIVE_VAR *pRelativeVar, LONG_PTR *plpIndex, int *pss){
-	extern BOOL bCompilingGlobal;
+bool GetVarOffset(bool isErrorEnabled,bool isWriteAccess,const char *NameBuffer,RELATIVE_VAR *pRelativeVar,Type &resultType,int *pss){
 	int i;
-	LONG_PTR lpIndex;
 	char variable[VN_SIZE],member[VN_SIZE],VarName[VN_SIZE],array[VN_SIZE],lpPtrOffset[VN_SIZE];
 
@@ -373,8 +376,10 @@
 
 		void *pInfo;
-		int idProc=GetProc(VarName,&pInfo);
+		int idProc=GetProc(VarName,(void **)&pInfo);
 
 		if(idProc){
 			pRelativeVar->dwKind=VAR_DIRECTMEM;
+
+			Type type;
 
 
@@ -383,5 +388,5 @@
 			////////////////
 
-			*pType=CallProc(idProc,pInfo,VarName,array,&lpIndex);
+			CallProc(idProc,pInfo,VarName,array,type);
 
 			//戻り値をecxにコピー
@@ -389,13 +394,11 @@
 
 
-			LONG_PTR lp2;
-			if(!GetMemberOffset(
+			if(!_member_offset(
 				isErrorEnabled,
 				isWriteAccess,
-				(CClass *)lpIndex,
-				member,pType,pRelativeVar,&lp2,0)) return 0;
-			if(plpIndex) *plpIndex=lp2;
-
-			return 1;
+				type.GetClass(),
+				member,pRelativeVar,resultType,0)) return false;
+
+			return true;
 		}
 	}
@@ -405,23 +408,18 @@
 	GetVarFormatString(VarName,array,lpPtrOffset,member,refType);
 
-	int *pSubScripts;
-	bool bConst;
-
-	if(bCompilingGlobal==0){
-		////////////////////
+	const int *pSubScripts;
+	bool bConst = false;
+
+
+	if( UserProc::IsLocalAreaCompiling() ){
+		//////////////////
 		// ローカル変数
-		////////////////////
-
-		for(i=MaxLocalVarNum-1;i>=0;i--){	//レキシカルスコープを考慮してバックサーチ
-			if( LocalVar[i].bLiving											//現在のスコープで有効なもの
-				&& LocalVar[i].ScopeLevel <= obj_LexScopes.GetNowLevel()	//現在のスコープレベルを超さないもの（Returnによる解放処理中を考慮）
-				){
-					if(lstrcmp(VarName,LocalVar[i].name)==0) break;
-			}
-		}
-		if(i>=0){
+		//////////////////
+
+		const Variable *pVar = UserProc::CompilingUserProc().localVars.BackSearch( VarName );
+		if( pVar ){
 			//ポインタ変数の場合
-			if(IsPtrType(LocalVar[i].type)){
-				if(LocalVar[i].SubScripts[0]==-1){
+			if( pVar->IsPointer() ){
+				if( !pVar->IsArray() ){
 					lstrcpy(lpPtrOffset,array);
 					array[0]=0;
@@ -432,17 +430,18 @@
 					SetError(16,variable,cp);
 					pRelativeVar->dwKind=NON_VAR;
-					return 0;
+					return false;
 				}
 			}
 
-			pRelativeVar->offset=-LocalVar[i].offset;
+			pRelativeVar->offset=-pVar->offset;
 			pRelativeVar->bOffsetOffset=0;
-			if(LocalVar[i].fRef) pRelativeVar->dwKind=VAR_REFLOCAL;
+			if( pVar->IsRef() ){
+				// 参照型
+				pRelativeVar->dwKind = VAR_REFLOCAL;
+			}
 			else pRelativeVar->dwKind=VAR_LOCAL;
-			*pType=LocalVar[i].type;
-			lpIndex=LocalVar[i].u.index;
-			if(plpIndex) *plpIndex=lpIndex;
-			pSubScripts=LocalVar[i].SubScripts;
-			bConst = LocalVar[i].bConst;
+			resultType = *pVar;
+			pSubScripts=pVar->GetSubScriptsPtr();
+			bConst = pVar->IsConst();
 
 			goto ok;
@@ -461,9 +460,8 @@
 			SetThisPtrToReg(REG_ECX);
 
-			*pType=DEF_OBJECT;
 			pRelativeVar->dwKind=VAR_DIRECTMEM;
 
-			if(plpIndex) *plpIndex=(LONG_PTR)pobj_CompilingClass;
-			return 1;
+			resultType.SetType( DEF_OBJECT, pobj_CompilingClass );
+			return true;
 		}
 
@@ -500,128 +498,112 @@
 
 		pRelativeVar->dwKind=VAR_DIRECTMEM;
-		if(!GetMemberOffset(
+		if(!_member_offset(
 			isErrorEnabled,
 			isWriteAccess,
-			pobj_CompilingClass,
+			*pobj_CompilingClass,
 			variable,
-			pType,
 			pRelativeVar,
-			&lpIndex,1)) return 0;
-		if(plpIndex) *plpIndex=lpIndex;
-		return 1;
+			resultType,1)) return false;
+		return true;
 	}
 
 NonClassMember:
 
-	//////////////////////////
-	// 静的ローカル変数
-	// ※"Static.Object.Method.Variable"
-	//////////////////////////
-
-	char temporary[VN_SIZE];
-	extern SubInfo *pCompilingSubInfo;
-	if(pCompilingSubInfo){
-		GetNowStaticVarFullName(VarName,temporary);
-
-		for(i=0;i<MaxGlobalVarNum;i++){
-			if(lstrcmp(temporary,GlobalVar[i].name)==0) break;
-		}
-		if(i!=MaxGlobalVarNum){
+	{
+		const Variable *pVar;
+
+		//////////////////////////
+		// 静的ローカル変数
+		// ※"Static.Object.Method.Variable"
+		//////////////////////////
+
+		char temporary[VN_SIZE];
+		if( UserProc::IsLocalAreaCompiling() ){
+			GetNowStaticVarFullName(VarName,temporary);
+
+			pVar = globalVars.Find( temporary );
+			if( pVar ){
+				goto GlobalOk;
+			}
+		}
+
+
+		//////////////////////////
+		// クラスの静的メンバ
+		//////////////////////////
+
+		if(member[0]){
+			lstrcpy(temporary,member);
+
+			char tempMember[VN_SIZE];
+			char tempArray[VN_SIZE];
+			{
+				CClass::RefType refType;
+				GetVarFormatString(temporary,tempArray,lpPtrOffset,tempMember, refType );
+			}
+
+			char temp2[VN_SIZE];
+			sprintf(temp2,"%s.%s",VarName,temporary);
+			pVar = globalVars.Find( temp2 );
+			if( pVar ){
+				lstrcpy(member,tempMember);
+				lstrcpy(array,tempArray);
+				goto GlobalOk;
+			}
+		}
+
+		if(pobj_CompilingClass){
+			//自身のクラスから静的メンバを参照する場合
+			char temp2[VN_SIZE];
+			sprintf(temp2,"%s.%s",pobj_CompilingClass->name,VarName);
+			pVar = globalVars.Find( temp2 );
+			if( pVar ){
+				goto GlobalOk;
+			}
+		}
+
+		/////////////////////
+		// グローバル変数
+		/////////////////////
+
+		pVar = globalVars.BackSearch( VarName );
+		if( pVar ){
 			goto GlobalOk;
 		}
-	}
-
-
-	//////////////////////////
-	// クラスの静的メンバ
-	//////////////////////////
-
-	if(member[0]){
-		lstrcpy(temporary,member);
-
-		char tempMember[VN_SIZE];
-		char tempArray[VN_SIZE];
-		{
-			CClass::RefType refType;
-			GetVarFormatString(temporary,tempArray,lpPtrOffset,tempMember, refType );
-		}
-
-		char temp2[VN_SIZE];
-		sprintf(temp2,"%s.%s",VarName,temporary);
-		for(i=0;i<MaxGlobalVarNum;i++){
-			if(lstrcmp(temp2,GlobalVar[i].name)==0) break;
-		}
-
-		if(i!=MaxGlobalVarNum){
-			lstrcpy(member,tempMember);
-			lstrcpy(array,tempArray);
-			goto GlobalOk;
-		}
-	}
-
-	if(pobj_CompilingClass){
-		//自身のクラスから静的メンバを参照する場合
-		char temp2[VN_SIZE];
-		sprintf(temp2,"%s.%s",pobj_CompilingClass->name,VarName);
-		for(i=0;i<MaxGlobalVarNum;i++){
-			if(lstrcmp(temp2,GlobalVar[i].name)==0) break;
-		}
-
-		if(i!=MaxGlobalVarNum){
-			goto GlobalOk;
-		}
-	}
-
-
-	////////////////////
-	// グローバル変数
-	////////////////////
-
-	for(i=MaxGlobalVarNum-1;i>=0;i--){	//レキシカルスコープを考慮してバックサーチ
-		if( GlobalVar[i].bLiving										//現在のスコープで有効なもの
-			&& GlobalVar[i].ScopeLevel <= obj_LexScopes.GetNowLevel()	//現在のスコープレベルを超さないもの（Returnによる解放処理中を考慮）
-			){
-				if(lstrcmp(VarName,GlobalVar[i].name)==0) break;
-		}
-	}
-	if(i>=0){
-		goto GlobalOk;
-	}
-
-
-	if(isErrorEnabled) SetError(3,variable,cp);
-	pRelativeVar->dwKind=NON_VAR;
-	return 0;
+
+		if(isErrorEnabled) SetError(3,variable,cp);
+		pRelativeVar->dwKind=NON_VAR;
+		return false;
+
 
 
 GlobalOk:
-
-	//ポインタ変数の場合
-	if(IsPtrType(GlobalVar[i].type)){
-		if(GlobalVar[i].SubScripts[0]==-1){
-			lstrcpy(lpPtrOffset,array);
-			array[0]=0;
-		}
-	}
-	else{
-		if(lpPtrOffset[0]){
-			SetError(16,variable,cp);
-			pRelativeVar->dwKind=NON_VAR;
-			return 0;
-		}
-	}
-
-	pRelativeVar->offset=GlobalVar[i].offset;
-	pRelativeVar->bOffsetOffset=0;
-	if(GlobalVar[i].fRef){
-		// 参照型
-		pRelativeVar->dwKind = VAR_REFGLOBAL;
-	}
-	else pRelativeVar->dwKind=VAR_GLOBAL;
-	*pType=GlobalVar[i].type;
-	lpIndex=GlobalVar[i].u.index;
-	if(plpIndex) *plpIndex=lpIndex;
-	pSubScripts=GlobalVar[i].SubScripts;
-	bConst = GlobalVar[i].bConst;
+		//ポインタ変数の場合
+		if( pVar->IsPointer() ){
+			if( !pVar->IsArray() ){
+				lstrcpy(lpPtrOffset,array);
+				array[0]=0;
+			}
+		}
+		else{
+			if(lpPtrOffset[0]){
+				SetError(16,variable,cp);
+				pRelativeVar->dwKind=NON_VAR;
+				return false;
+			}
+		}
+
+		pRelativeVar->offset=pVar->offset;
+		pRelativeVar->bOffsetOffset=0;
+		if( pVar->IsRef() ){
+			// 参照型
+			pRelativeVar->dwKind = VAR_REFGLOBAL;
+		}
+		else pRelativeVar->dwKind=VAR_GLOBAL;
+		resultType = *pVar;
+		pSubScripts=pVar->GetSubScriptsPtr();
+		bConst = pVar->IsConst();
+	}
+
 
 
@@ -630,5 +612,5 @@
 	if( bConst && isWriteAccess ){
 		//Const定義の変数に書き込みアクセスをしようとした場合
-		if( *pType == DEF_OBJECT ){
+		if( resultType.IsObject() ){
 			//オブジェクト定数
 			SetError(130, VarName, cp );
@@ -642,7 +624,7 @@
 	if(array[0]==0&&pSubScripts[0]!=-1){
 		//配列の先頭ポインタを示す場合
-		*pType|=FLAG_PTR;
+		resultType.SetBasicType( resultType.GetBasicType() | FLAG_PTR );
 		if(pss) memcpy(pss,pSubScripts,MAX_ARRAYDIM);
-		return 1;
+		return true;
 	}
 
@@ -655,25 +637,25 @@
 	}
 	if(array[0]){
-		if(!GetArrayOffset(pSubScripts,array,*pType,lpIndex)){
+		if(!GetArrayOffset(pSubScripts,array,resultType)){
 			SetError(14,variable,cp);
 			pRelativeVar->dwKind=NON_VAR;
-			return 0;
+			return false;
 		}
 	}
 	if(member[0]){
-		if(*pType==DEF_OBJECT || *pType==DEF_STRUCT){
+		if( resultType.IsObject() || resultType.IsStruct() ){
 			//実態オブジェクトのメンバを参照（obj.member）
 			if( refType != CClass::Dot ){
 				SetError(104,VarName,cp);
 				pRelativeVar->dwKind=NON_VAR;
-				return 0;
-			}
-
-			if( *pType==DEF_OBJECT ){
+				return false;
+			}
+
+			if( resultType.IsObject() ){
 				// 参照内容へのポインタを抽出
 				SetRelativeOffset( *pRelativeVar );
 			}
 		}
-		else if(*pType==DEF_PTR_OBJECT || *pType==DEF_PTR_STRUCT){
+		else if( resultType.IsObjectPtr() || resultType.IsStructPtr() ){
 			//ポインタオブジェクトが示すメンバを参照
 			if(lpPtrOffset[0]){
@@ -682,7 +664,7 @@
 					SetError(104,VarName,cp);
 					pRelativeVar->dwKind=NON_VAR;
-					return 0;
+					return false;
 				}
-				SetRelativeOffset(pType,lpIndex,pRelativeVar,lpPtrOffset);
+				SetRelativeOffset(resultType,pRelativeVar,lpPtrOffset);
 				pRelativeVar->dwKind=VAR_DIRECTMEM;
 			}
@@ -692,5 +674,5 @@
 					SetError(104,VarName,cp);
 					pRelativeVar->dwKind=NON_VAR;
-					return 0;
+					return false;
 				}
 
@@ -703,5 +685,5 @@
 			}
 		}
-		else if(*pType==MAKE_PTR_TYPE(DEF_OBJECT,2) || *pType==MAKE_PTR_TYPE(DEF_STRUCT,2)){
+		else if( resultType.GetBasicType()==MAKE_PTR_TYPE(DEF_OBJECT,2) || resultType.GetBasicType()==MAKE_PTR_TYPE(DEF_STRUCT,2)){
 			//ポインタオブジェクトが示すメンバを参照
 			if(lpPtrOffset[0]){
@@ -710,8 +692,8 @@
 					SetError(104,VarName,cp);
 					pRelativeVar->dwKind=NON_VAR;
-					return 0;
+					return false;
 				}
 
-				SetRelativeOffset(pType,lpIndex,pRelativeVar,lpPtrOffset);
+				SetRelativeOffset(resultType,pRelativeVar,lpPtrOffset);
 				pRelativeVar->dwKind=VAR_DIRECTMEM;
 
@@ -726,5 +708,5 @@
 				SetError(104,VarName,cp);
 				pRelativeVar->dwKind=NON_VAR;
-				return 0;
+				return false;
 			}
 		}
@@ -732,29 +714,27 @@
 			SetError(102,VarName,cp);
 			pRelativeVar->dwKind=NON_VAR;
-			return 0;
-		}
-
-		LONG_PTR lp2;
-		if(!GetMemberOffset(
+			return false;
+		}
+
+		if(!_member_offset(
 			isErrorEnabled,
 			isWriteAccess,
-			(CClass *)lpIndex,
-			member,pType,pRelativeVar,&lp2,0)) return 0;
-		if(plpIndex) *plpIndex=lp2;
-
-		return 1;
+			resultType.GetClass(),
+			member,pRelativeVar,resultType,0)) return false;
+
+		return true;
 	}
 
 	if(lpPtrOffset[0]){
-		SetRelativeOffset(pType,lpIndex,pRelativeVar,lpPtrOffset);
+		SetRelativeOffset(resultType,pRelativeVar,lpPtrOffset);
 		pRelativeVar->dwKind=VAR_DIRECTMEM;
 	}
 
-	return 1;
+	return true;
 }
 
-BOOL SetInitGlobalData(int offset,int type,LONG_PTR lpIndex,int *SubScripts,char *InitBuf){
+bool SetInitGlobalData(int offset,const Type &type,const int *SubScripts,char *InitBuf){
 	extern BYTE *initGlobalBuf;
-	int i,i2,i3,TypeSize;
+	int i,i2,i3;
 	char temporary[VN_SIZE];
 
@@ -763,8 +743,8 @@
 		InitBuf[lstrlen(InitBuf)-1]=0;
 
-		TypeSize=GetTypeSize(type,lpIndex);
+		int typeSize = type.GetSize();
 
 		if(SubScripts[0]!=-1){
-			TypeSize*=JumpSubScripts(SubScripts+1);
+			typeSize*=JumpSubScripts(SubScripts+1);
 			i=0;
 			i2=0;
@@ -776,41 +756,38 @@
 				i=GetOneParameter(InitBuf,i,temporary);
 				if(!SetInitGlobalData(
-					offset+i2*TypeSize,
+					offset+i2*typeSize,
 					type,
-					lpIndex,
 					SubScripts+1,
-					temporary)) return 0;
+					temporary)) return false;
 				i2++;
 				if(InitBuf[i]=='\0') break;
 			}
-			return -1;
-		}
-
-		if(type==DEF_STRUCT){
-			CClass *pobj_c;
-			pobj_c=(CClass *)lpIndex;
-
-			for(i=0,i2=0;i2<pobj_c->iMemberNum;i2++){
+			return true;
+		}
+
+		if(type.IsStruct()){
+			const CClass &objClass = type.GetClass();
+
+			for(i=0,i2=0;i2<objClass.iMemberNum;i2++){
 				i=GetOneParameter(InitBuf,i,temporary);
 
-				i3=pobj_c->GetMemberOffset( pobj_c->ppobj_Member[i2]->name, NULL );
+				i3=objClass.GetMemberOffset( objClass.ppobj_Member[i2]->name, NULL );
 
 				if(!SetInitGlobalData(offset+i3,
-					pobj_c->ppobj_Member[i2]->TypeInfo.type,
-					pobj_c->ppobj_Member[i2]->TypeInfo.u.lpIndex,
-					pobj_c->ppobj_Member[i2]->SubScripts,
-					temporary)) return 0;
+					*objClass.ppobj_Member[i2],
+					objClass.ppobj_Member[i2]->SubScripts,
+					temporary)) return false;
 
 				if(InitBuf[i]=='\0') break;
 			}
-			if(i2+1!=pobj_c->iMemberNum){
+			if(i2+1!=objClass.iMemberNum){
 				SetError(41,0,cp);
-				return 0;
-			}
-			return 1;
+				return false;
+			}
+			return true;
 		}
 
 		SetError(41,0,cp);
-		return 0;
+		return false;
 	}
 
@@ -820,21 +797,24 @@
 	///////////////////////////////////////
 
-	if( type == DEF_OBJECT || type == DEF_STRUCT ){
+	if( type.IsObject() || type.IsStruct() ){
 		//オブジェクトまたは構造体の場合はありえない
 		SetError(300,NULL,cp);
-		return 0;
+		return false;
 	}
 
 	if(SubScripts[0]!=-1){
 		SetError(41,0,cp);
-		return 0;
+		return false;
 	}
 
 	double dbl;
 	_int64 i64data;
-	int CalcType;
-	LONG_PTR lpCalcIndex;
-	CalcType=StaticCalculation(true, InitBuf,type,&i64data,&lpCalcIndex);
-	if(IsRealNumberType(CalcType)){
+	Type calcType;
+
+	if( !StaticCalculation(false, InitBuf,type.GetBasicType(),&i64data,calcType) ){
+		//動的データだった場合
+		return false;
+	}
+	if( calcType.IsReal() ){
 		memcpy(&dbl,&i64data,sizeof(double));
 		i64data=(_int64)dbl;
@@ -845,17 +825,18 @@
 	CheckDifferentType(
 		type,
-		lpIndex,
-		CalcType,
-		lpCalcIndex,
+		calcType,
 		0,0);
 
-	if(type==DEF_DOUBLE)
+	if( type.IsDouble() ){
 		*(double *)(initGlobalBuf+offset)=(double)dbl;
-	else if(type==DEF_SINGLE)
+	}
+	else if( type.IsSingle() ){
 		*(float *)(initGlobalBuf+offset)=(float)dbl;
-	else if(type==DEF_INT64||type==DEF_QWORD)
+	}
+	else if( type.Is64() ){
 		*(_int64 *)(initGlobalBuf+offset)=i64data;
-	else if(type==DEF_LONG||type==DEF_DWORD||IsPtrType(type)){
-		if(type==typeOfPtrChar&&lpCalcIndex==LITERAL_STRING){
+	}
+	else if( type.IsLong() || type.IsDWord() || type.IsPointer() ){
+		if(type.GetBasicType()==typeOfPtrChar&&calcType.GetIndex()==LITERAL_STRING){
 			//文字列定数のとき
 
@@ -881,13 +862,15 @@
 		}
 	}
-	else if(type==DEF_INTEGER||type==DEF_WORD || (isUnicode&&type==DEF_CHAR))
+	else if( type.IsWord() || type.IsInteger() ){
 		*(WORD *)(initGlobalBuf+offset)=(WORD)i64data;
-	else if(type==DEF_SBYTE||type==DEF_BYTE||type==DEF_BOOLEAN || (isUnicode==false&&type==DEF_CHAR))
+	}
+	else if( type.IsSByte() || type.IsByte() || type.IsBoolean() ){
 		*(BYTE *)(initGlobalBuf+offset)=(BYTE)i64data;
-	//String型が未完成
-	return 1;
+	}
+
+	return true;
 }
-BOOL InitLocalVar(int offset,int type,LONG_PTR lpIndex,int *SubScripts,char *InitBuf){
-	int i,i2,i3,TypeSize;
+bool InitLocalVar(int offset,const Type &type,const int *SubScripts,char *InitBuf){
+	int i,i2,i3;
 	char temporary[VN_SIZE];
 
@@ -896,8 +879,8 @@
 		InitBuf[lstrlen(InitBuf)-1]=0;
 
-		TypeSize=GetTypeSize(type,lpIndex);
+		int typeSize = type.GetSize();
 
 		if(SubScripts[0]!=-1){
-			TypeSize*=JumpSubScripts(SubScripts+1);
+			typeSize*=JumpSubScripts(SubScripts+1);
 			i=0;
 			i2=0;
@@ -905,45 +888,42 @@
 				if(SubScripts[0]<i2){
 					SetError(41,0,cp);
-					return 0;
+					return false;
 				}
 				i=GetOneParameter(InitBuf,i,temporary);
 				if(!InitLocalVar(
-					offset+i2*TypeSize,
+					offset+i2*typeSize,
 					type,
-					lpIndex,
 					SubScripts+1,
-					temporary)) return 0;
+					temporary)) return false;
 				i2++;
 				if(InitBuf[i]=='\0') break;
 			}
-			return -1;
-		}
-
-		if(type==DEF_STRUCT){
-			CClass *pobj_c;
-			pobj_c=(CClass *)lpIndex;
-
-			for(i=0,i2=0;i2<pobj_c->iMemberNum;i2++){
+			return true;
+		}
+
+		if(type.IsStruct()){
+			const CClass &objClass = type.GetClass();
+
+			for(i=0,i2=0;i2<objClass.iMemberNum;i2++){
 				i=GetOneParameter(InitBuf,i,temporary);
 
-				i3 = pobj_c->GetMemberOffset( pobj_c->ppobj_Member[i2]->name, NULL );
+				i3=objClass.GetMemberOffset( objClass.ppobj_Member[i2]->name, NULL );
 
 				if(!InitLocalVar(offset+i3,
-					pobj_c->ppobj_Member[i2]->TypeInfo.type,
-					pobj_c->ppobj_Member[i2]->TypeInfo.u.lpIndex,
-					pobj_c->ppobj_Member[i2]->SubScripts,
-					temporary)) return 0;
+					*objClass.ppobj_Member[i2],
+					objClass.ppobj_Member[i2]->SubScripts,
+					temporary)) return false;
 
 				if(InitBuf[i]=='\0') break;
 			}
-			if(i2+1!=pobj_c->iMemberNum){
+			if(i2+1!=objClass.iMemberNum){
 				SetError(41,0,cp);
 				return 0;
 			}
-			return 1;
+			return true;
 		}
 
 		SetError(41,0,cp);
-		return 0;
+		return false;
 	}
 
@@ -955,17 +935,16 @@
 	if(SubScripts[0]!=-1){
 		SetError(41,0,cp);
-		return 0;
+		return false;
 	}
 
 	double dbl;
 	_int64 i64data;
-	int CalcType;
-	LONG_PTR lpCalcIndex;
-	CalcType=StaticCalculation(false, InitBuf,type,&i64data,&lpCalcIndex);
-	if(!CalcType){
+	Type calcType;
+
+	if( !StaticCalculation(false, InitBuf,type.GetBasicType(),&i64data,calcType) ){
 		//動的データだった場合
-		return 0;
-	}
-	if(IsRealNumberType(CalcType)){
+		return false;
+	}
+	if( calcType.IsReal() ){
 		memcpy(&dbl,&i64data,sizeof(double));
 		i64data=(_int64)dbl;
@@ -976,10 +955,8 @@
 	CheckDifferentType(
 		type,
-		lpIndex,
-		CalcType,
-		lpCalcIndex,
+		calcType,
 		0,0);
 
-	if(type==DEF_DOUBLE){
+	if( type.IsDouble() ){
 		//mov eax,HILONG(dbl)
 		OpBuffer[obp++]=(char)0xB8;
@@ -1006,5 +983,5 @@
 		obp+=sizeof(long);
 	}
-	else if(type==DEF_SINGLE){
+	else if( type.IsSingle() ){
 		float flt;
 		flt=(float)dbl;
@@ -1021,5 +998,5 @@
 		obp+=sizeof(long);
 	}
-	else if(type==DEF_INT64||type==DEF_QWORD){
+	else if( type.Is64() ){
 		//mov eax,HILONG(i64data)
 		OpBuffer[obp++]=(char)0xB8;
@@ -1046,6 +1023,6 @@
 		obp+=sizeof(long);
 	}
-	else if(type==DEF_LONG||type==DEF_DWORD||IsPtrType(type)){
-		if(type==typeOfPtrChar&&lpCalcIndex==LITERAL_STRING){
+	else if( type.IsDWord() || type.IsLong() || type.IsPointer() ){
+		if(type.GetBasicType()==typeOfPtrChar&&calcType.GetIndex()==LITERAL_STRING){
 			//文字列定数のとき
 
@@ -1075,5 +1052,5 @@
 		obp+=sizeof(long);
 	}
-	else if(type==DEF_INTEGER||type==DEF_WORD || (isUnicode&&type==DEF_CHAR)){
+	else if( type.IsWord() || type.IsInteger() ){
 		//mov ax,InitValue
 		OpBuffer[obp++]=(char)0x66;
@@ -1090,5 +1067,5 @@
 		obp+=sizeof(long);
 	}
-	else if(type==DEF_SBYTE||type==DEF_BYTE||type==DEF_BOOLEAN || (isUnicode==false&&type==DEF_CHAR)){
+	else if( type.IsSByte() || type.IsByte() || type.IsBoolean() ){
 		//mov byte ptr[ebp+offset],InitValue
 		OpBuffer[obp++]=(char)0xC6;
@@ -1100,16 +1077,15 @@
 		obp+=sizeof(BYTE);
 	}
-	//String型が未完成
-	return 1;
+
+	return true;
 }
 
-void dim(bool isRef, char *VarName,int *SubScripts,TYPEINFO &TypeInfo,int TypeSize,char *InitBuf,char *ConstractParameter,DWORD dwFlags){
-	extern BOOL bCompilingGlobal;
-	if(bCompilingGlobal){
+void dim(bool isRef, char *VarName,int *SubScripts,Type &type,char *InitBuf,char *ConstractParameter,DWORD dwFlags){
+	if( UserProc::IsGlobalAreaCompiling() ){
 		/////////////////////////
 		// グローバル変数
 		/////////////////////////
 
-		AddGlobalVariable(isRef,VarName,SubScripts,&TypeInfo,TypeSize,InitBuf,ConstractParameter,dwFlags);
+		AddGlobalVariable(isRef,VarName,SubScripts,type,InitBuf,ConstractParameter,dwFlags);
 	}
 	else{
@@ -1118,47 +1094,21 @@
 		/////////////////
 
-		int i2,i3;
-
-		for(i2=0;i2<MaxLocalVarNum;i2++){
-			if(LocalVar[i2].bLiving&&obj_LexScopes.GetNowLevel()==LocalVar[i2].ScopeLevel){
-				if(lstrcmp(LocalVar[i2].name,VarName)==0){
-					//２重定義のエラー
-					SetError(15,VarName,cp);
-					return;
-				}
-			}
-		}
-
-		LocalVar=(VARIABLE *)HeapReAlloc(hHeap,0,LocalVar,(MaxLocalVarNum+1)*sizeof(VARIABLE));
-		VARIABLE *pVar = &LocalVar[MaxLocalVarNum];
-		MaxLocalVarNum++;
-
-		if( isRef ){
-			//参照型
-			pVar->fRef = REF_VARIABLE;
-			TypeSize = PTR_SIZE;
-		}
-		else pVar->fRef=0;
-
-		for(i2=1,i3=0;i3<255;i3++){
-			//配列要素数
-			pVar->SubScripts[i3]=SubScripts[i3];
-
-			if(SubScripts[i3]==-1) break;
-			i2*=SubScripts[i3]+1;
-		}
-		int VarSize=TypeSize*i2;
-		if(VarSize%4) VarSize+=4-(VarSize%4);
-
-		//変数データを追加
-		lstrcpy(pVar->name,VarName);
-		if(dwFlags & DIMFLAG_CONST) pVar->bConst = true;
-		else pVar->bConst = false;
-		if(SubScripts[0]==-1) pVar->bArray=0;
-		else pVar->bArray=1;
-		pVar->type=TypeInfo.type;
-		pVar->u.index=TypeInfo.u.lpIndex;
-		AllLocalVarSize+=VarSize;
-		pVar->offset=AllLocalVarSize;
+		if( UserProc::CompilingUserProc().localVars.BackSearch( VarName ) ){
+			//２重定義のエラー
+			SetError(15,VarName,cp);
+			return;
+		}
+
+		bool isConst = ( dwFlags & DIMFLAG_CONST ) ? true:false;
+
+		Variable *pVar = new Variable( VarName, type, isConst, isRef );
+
+		if( SubScripts[0] != -1 ){
+			//配列あり
+			pVar->SetArray( SubScripts );
+		}
+
+		//コンストラクタ用パラメータ
+		pVar->paramStrForConstructor = ConstractParameter;
 
 		//レキシカルスコープ
@@ -1167,15 +1117,39 @@
 		pVar->bLiving=TRUE;
 
+		//エラー用
+		pVar->source_code_address=cp;
+
+		// 変数を追加
+		UserProc::CompilingUserProc().localVars.push_back( pVar );
+
+		//アラインメントを考慮
+		if( pVar->IsStruct() ){
+			int alignment = pVar->GetClass().iAlign;
+			if( alignment ){
+				if( AllLocalVarSize % alignment ){
+					AllLocalVarSize += alignment - (AllLocalVarSize % alignment);
+				}
+			}
+		}
+
+		AllLocalVarSize += pVar->GetMemorySize();
+		pVar->offset = AllLocalVarSize;
+
+		//レキシカルスコープ
+		pVar->ScopeLevel=obj_LexScopes.GetNowLevel();
+		pVar->ScopeStartAddress=obj_LexScopes.GetStartAddress();
+		pVar->bLiving=TRUE;
+
 		if(InitBuf[0]){
 			//初期代入時のみ、書き込みアクセスを許可する
-			bool bConstBack = pVar->bConst;
-			pVar->bConst = false;
+			if( isConst ){
+				pVar->ConstOff();
+			}
 
 			int result = 0;
-			if( pVar->type != DEF_OBJECT ){
+			if( !pVar->IsObject() ){
 				result = InitLocalVar(-pVar->offset,
-					pVar->type,
-					pVar->u.index,
-					pVar->SubScripts,
+					*pVar,
+					pVar->GetSubScriptsPtr(),
 					InitBuf);
 			}
@@ -1188,5 +1162,7 @@
 			}
 
-			pVar->bConst = bConstBack;
+			if( isConst ){
+				pVar->ConstOn();
+			}
 		}
 		else{
@@ -1195,5 +1171,5 @@
 
 			//push VarSize
-			op_push_V(VarSize);
+			op_push_V( pVar->GetMemorySize() );
 
 			//mov eax,ebp
@@ -1213,8 +1189,7 @@
 			OpBuffer[obp++]=(char)0xFF;
 			OpBuffer[obp++]=(char)0x15;
-			DECLAREINFO *pdi;
-			pdi=GetDeclareHash("FillMemory");
-			pdi->bUse=1;
-			pobj_ImportAddrSchedule->add(pdi);
+			DllProc *pDllProc = GetDeclareHash("FillMemory");
+			pDllProc->Using();
+			pobj_ImportAddrSchedule->add(pDllProc);
 			obp+=sizeof(long);
 		}
@@ -1222,5 +1197,5 @@
 
 	//New呼び出し
-	if(TypeInfo.type==DEF_OBJECT&&(dwFlags&DIMFLAG_NONCALL_CONSTRACTOR)==0&&InitBuf[0]=='\0'){
+	if( type.IsObject() &&(dwFlags&DIMFLAG_NONCALL_CONSTRACTOR)==0&&InitBuf[0]=='\0'){
 		char objectSize[255];
 		if( SubScripts[0] == -1 ){
@@ -1233,13 +1208,11 @@
 			sprintf( objectSize, "%d", SubScripts[0] );
 		}
-		Operator_New( *TypeInfo.u.pobj_Class, objectSize, ConstractParameter, TypeInfo );
+		Operator_New( type.GetClass(), objectSize, ConstractParameter, type );
 
 		//pop eax
 		op_pop( REG_EAX );
 
-		int type;
-		LONG_PTR lpIndex;
 		RELATIVE_VAR RelativeVar;
-		GetVarOffset( true, false, VarName, &type, &RelativeVar, &lpIndex );
+		GetVarOffset( true, false, VarName, &RelativeVar, Type() );
 		if( RelativeVar.dwKind == VAR_DIRECTMEM ){
 			SetError();
@@ -1248,136 +1221,9 @@
 	}
 
-	if(TypeInfo.type==DEF_OBJECT){
-		if(TypeInfo.u.pobj_Class->IsAbstract()){
+	if( type.IsObject() ){
+		if( type.GetClass().IsAbstract() ){
 			//抽象クラスだったとき
-			SetError(125,TypeInfo.u.pobj_Class->name,cp);
-		}
-	}
-}
-void dim(char *Parameter,DWORD dwFlags){
-	extern BOOL bCompilingGlobal;
-	extern HANDLE hHeap;
-	int i2;
-	char VarName[VN_SIZE];
-
-
-	//参照型かどうか
-	bool isRef = false;
-
-	i2 = 0;
-
-	if( Parameter[i2] == 1 && Parameter[i2+1] == ESC_BYREF ){
-		//参照型
-		isRef = true;
-		Parameter += 2;
-	}
-
-
-	if(dwFlags & DIMFLAG_CONST){
-		//////////////////////////////////
-		// 定数変数の場合を考慮
-		//////////////////////////////////
-		for(;;i2++){
-			if(Parameter[i2] == '=' ||
-				Parameter[i2] == 1 && Parameter[i2] == ESC_AS ||
-				Parameter[i2] =='('){
-					VarName[i2] = 0;
-					break;
-			}
-			VarName[i2] = Parameter[i2];
-		}
-
-		//定数と２重定義されていないる場合は抜け出す
-		if(CDBConst::obj.GetType(VarName)){
-			return;
-		}
-
-		//定数マクロとして定義されている場合は抜け出す
-		if(GetConstHash(VarName)){
-			return;
-		}
-	}
-
-
-	//構文を解析
-	int SubScripts[MAX_ARRAYDIM];
-	TYPEINFO TypeInfo;
-	char InitBuf[8192];
-	char ConstractParameter[VN_SIZE];
-	if(!GetDimentionFormat(Parameter, isRef, VarName,SubScripts,&TypeInfo,InitBuf,ConstractParameter))
-		return;
-
-
-	//定数と２重定義されていないかを調べる
-	if(CDBConst::obj.GetType(VarName)){
-		SetError(15,VarName,cp);
-		return;
-	}
-
-	//定数マクロとして定義されている場合
-	if(GetConstHash(VarName)){
-		SetError(15,VarName,cp);
-		return;
-	}
-
-
-	//タイプサイズを取得
-	int TypeSize;
-	TypeSize=GetTypeSize(TypeInfo.type,TypeInfo.u.lpIndex);
-
-	if(dwFlags&DIMFLAG_STATIC){
-		if(bCompilingGlobal){
-			SetError(60,NULL,cp);
-			return;
-		}
-
-		/////////////////////
-		// Static変数
-		// ※"Static.Object.Method.Variable"
-		/////////////////////
-
-		char temporary[VN_SIZE];
-		GetNowStaticVarFullName(VarName,temporary);
-
-		dim( isRef,temporary,SubScripts,TypeInfo,TypeSize,InitBuf,ConstractParameter,dwFlags );
-
-		/*
-		Note: 静的変数のコンストラクタ呼び出しは
-			_System_InitStaticLocalVariables関数内で一括して行う
-		*/
-	}
-	else{
-		dim( isRef,VarName,SubScripts,TypeInfo,TypeSize,InitBuf,ConstractParameter,dwFlags );
-	}
-}
-void OpcodeDim(char *Parameter,DWORD dwFlags){
-	int i,i2,i3,IsStr=0;
-	char temporary[8192];
-
-	for(i=0,i2=0;;i++,i2++){
-		if(Parameter[i]=='\"') IsStr^=1;
-		if(Parameter[i]=='('&&IsStr==0){
-			i3=GetStringInPare(temporary+i2,Parameter+i);
-			i+=i3-1;
-			i2+=i3-1;
-			continue;
-		}
-		if(Parameter[i]=='['&&IsStr==0){
-			i3=GetStringInBracket(temporary+i2,Parameter+i);
-			i+=i3-1;
-			i2+=i3-1;
-			continue;
-		}
-		if((Parameter[i]==','&&IsStr==0)||
-			Parameter[i]=='\0'){
-			temporary[i2]=0;
-
-			dim(temporary,dwFlags);
-
-			if(Parameter[i]=='\0') break;
-			i2=-1;
-			continue;
-		}
-		temporary[i2]=Parameter[i];
+			SetError(125,type.GetClass().name,cp);
+		}
 	}
 }
