Index: /BasicCompiler32/Compile_Calc_PushVar.cpp
===================================================================
--- /BasicCompiler32/Compile_Calc_PushVar.cpp	(revision 96)
+++ /BasicCompiler32/Compile_Calc_PushVar.cpp	(revision 97)
@@ -65,5 +65,5 @@
 	}
 }
-void SetReg_WholeVariable(int type,RELATIVE_VAR *pRelativeVar,int reg){
+void SetReg_WholeVariable(int type,RELATIVE_VAR *pRelativeVar,int reg, bool is64Head){
 	int varSize;
 
@@ -81,19 +81,22 @@
 
 		//上位32ビットをedxにロード
-		pRelativeVar->offset+=sizeof(long);
-		SetReg_WholeVariable(DEF_LONG,pRelativeVar,REG_EDX);
-		pRelativeVar->offset-=sizeof(long);
+		SetReg_WholeVariable(DEF_LONG,pRelativeVar,REG_EDX, true);
 
 		return;
 	}
 
+	int offsetOf64Head = 0;
+	if( is64Head ){
+		offsetOf64Head = sizeof(long);
+	}
+
 	if(pRelativeVar->dwKind==VAR_GLOBAL){
 		if(pRelativeVar->bOffsetOffset){
 			//mov reg, ptr[ecx+offset]
-			op_mov_RM(varSize,reg,REG_ECX,(int)pRelativeVar->offset,MOD_BASE_DISP32);
+			op_mov_RM(varSize,reg,REG_ECX,(int)pRelativeVar->offset + offsetOf64Head,MOD_BASE_DISP32);
 		}
 		else{
 			//mov reg, ptr[offset]
-			op_mov_RM(varSize,reg,0,(int)pRelativeVar->offset,MOD_DISP32);
+			op_mov_RM(varSize,reg,0,(int)pRelativeVar->offset + offsetOf64Head,MOD_DISP32);
 		}
 		obp-=sizeof(long);
@@ -119,9 +122,9 @@
 		if(pRelativeVar->bOffsetOffset){
 			//mov reg, ptr[ebp+ecx+offset]
-			op_mov_RM_ex(varSize,reg,REG_EBP,REG_ECX,(int)pRelativeVar->offset,USE_OFFSET);
+			op_mov_RM_ex(varSize,reg,REG_EBP,REG_ECX,(int)pRelativeVar->offset + offsetOf64Head,USE_OFFSET);
 		}
 		else{
 			//mov reg, ptr[ebp+offset]
-			op_mov_RM(varSize,reg,REG_EBP,(int)pRelativeVar->offset,MOD_BASE_DISP32);
+			op_mov_RM(varSize,reg,REG_EBP,(int)pRelativeVar->offset + offsetOf64Head,MOD_BASE_DISP32);
 		}
 		obp-=sizeof(long);
@@ -146,6 +149,12 @@
 	else if(pRelativeVar->dwKind==VAR_DIRECTMEM){
 directmem:
-		//mov reg, ptr[ecx]
-		op_mov_RM(varSize,reg,REG_ECX,0,MOD_BASE);
+		if( is64Head ){
+			//mov reg, ptr[ecx]
+			op_mov_RM(varSize,reg,REG_ECX,offsetOf64Head,MOD_BASE_DISP8);
+		}
+		else{
+			//mov reg, ptr[ecx]
+			op_mov_RM(varSize,reg,REG_ECX,0,MOD_BASE);
+		}
 	}
 }
Index: /BasicCompiler32/Compile_CallProc.cpp
===================================================================
--- /BasicCompiler32/Compile_CallProc.cpp	(revision 96)
+++ /BasicCompiler32/Compile_CallProc.cpp	(revision 97)
@@ -116,5 +116,5 @@
 	if( pUserProc->GetParentClassPtr() ){
 		//クラスのメンバ関数を呼び出す場合はアクセスチェックを行う
-		if(ObjectName[0]){
+		if(ObjectName[0] && (dwFlags&PROCFLAG_NEW)==0){
 			if(lstrcmpi(ObjectName,"Super")==0){
 				//クラスメンバ関数内から基底クラスの呼び出し
@@ -272,5 +272,5 @@
 		//////////////////////////////////////////////////////
 
-		if(ObjectName[0]){
+		if(ObjectName[0] && (dwFlags&PROCFLAG_NEW)==0){
 			if(lstrcmpi(ObjectName,"Super")==0) goto InClassMember;
 			else{
Index: /BasicCompiler32/Compile_Func.cpp
===================================================================
--- /BasicCompiler32/Compile_Func.cpp	(revision 96)
+++ /BasicCompiler32/Compile_Func.cpp	(revision 97)
@@ -205,5 +205,5 @@
 	}
 
-	if( type.IsStringObject() ){
+	if( type.IsStringClass() ){
 		//Stringオブジェクトの場合
 		sprintf(temporary,"%s.Length",tempParm);
Index: /BasicCompiler32/Compile_Var.cpp
===================================================================
--- /BasicCompiler32/Compile_Var.cpp	(revision 96)
+++ /BasicCompiler32/Compile_Var.cpp	(revision 97)
@@ -336,12 +336,4 @@
 
 	return true;
-}
-void GetWithName(char *buffer){
-	extern WITHINFO WithInfo;
-	int i;
-
-	buffer[0]=0;
-	for(i=0;i<WithInfo.num;i++)
-		lstrcat(buffer,WithInfo.ppName[i]);
 }
 
@@ -836,5 +828,5 @@
 	}
 	else if( type.IsLong() || type.IsDWord() || type.IsPointer() ){
-		if(type.GetBasicType()==typeOfPtrChar&&calcType.GetIndex()==LITERAL_STRING){
+		if(type.GetBasicType()==typeOfPtrChar){
 			//文字列定数のとき
 
@@ -1022,5 +1014,5 @@
 	}
 	else if( type.IsDWord() || type.IsLong() || type.IsPointer() ){
-		if(type.GetBasicType()==typeOfPtrChar&&calcType.GetIndex()==LITERAL_STRING){
+		if(type.GetBasicType()==typeOfPtrChar){
 			//文字列定数のとき
 
@@ -1307,4 +1299,11 @@
 	}
 }
+void SetVarPtrToReg(int reg,RELATIVE_VAR *pRelativeVar){
+	if( reg != REG_EAX ){
+		SetError();
+		//TODO: 未完成
+	}
+	SetVarPtrToEax( pRelativeVar );
+}
 
 bool Compile_AddGlobalRootsForGc(){
Index: /BasicCompiler32/NumOpe.cpp
===================================================================
--- /BasicCompiler32/NumOpe.cpp	(revision 96)
+++ /BasicCompiler32/NumOpe.cpp	(revision 97)
@@ -83,5 +83,431 @@
 }
 
-
+void ExtendRegToBigType( int reg, int bigBasicType, int baseBasicType ){
+	if( reg != REG_EAX ){
+		SetError();
+	}
+	switch( Type::GetBasicSize( bigBasicType ) ){
+		case sizeof(_int64):
+			ExtendTypeTo64(baseBasicType);
+			break;
+		case sizeof(long):
+			ExtendTypeTo32(baseBasicType,reg);
+			break;
+		case sizeof(short):
+			ExtendTypeTo16(baseBasicType,reg);
+			break;
+	}
+}
+
+
+
+bool VarToReg( RELATIVE_VAR &relativeVar, const Type &baseType, Type &resultType ){
+	const int useReg = REG_EAX;
+
+	//大きな型への暗黙の変換
+	int bigType = AutoBigCast(baseType.GetBasicType(),resultType.GetBasicType());
+
+	if(resultType.GetBasicType()&FLAG_PTR){
+		//配列ポインタ
+		resultType.SetBasicType( GetPtrType(resultType.GetBasicType()^FLAG_PTR) );
+
+		SetVarPtrToReg(useReg, &relativeVar);
+	}
+	else if( resultType.IsStruct() ){
+		//構造体ポインタをeaxへ格納（構造体は値型）
+		SetVarPtrToReg(useReg, &relativeVar);
+	}
+	else if( resultType.IsReal() ){
+		// 実数
+		SetReg_RealVariable( resultType.GetBasicType(), &relativeVar );
+	}
+	else if( resultType.IsWhole() || resultType.IsObject()){
+		//整数型
+		SetReg_WholeVariable(resultType.GetBasicType(),&relativeVar,useReg);
+	}
+	else if( resultType.IsStruct() ){
+		//構造体ポインタをUseRegへ格納（構造体は値型）
+		SetVarPtrToReg(useReg,&relativeVar);
+	}
+	else{
+		return false;
+	}
+
+	if( resultType.GetBasicType() != bigType ){
+		// 大きな型へ変換された場合
+		// ※レジスタの値をキャストする
+		ExtendRegToBigType( useReg, bigType, resultType.GetBasicType() );
+
+		resultType.SetBasicType( bigType );
+	}
+
+	return true;
+}
+bool TermMemberOpe( const CClass &objClass, const Type &baseType, Type &resultType, const char *termFull, const char *termLeft, const char *member ){
+	const int useReg = REG_EAX;
+
+	if( GetMemberType( objClass, member, resultType, 0, false ) ){
+		// メンバが見つかったとき
+
+		//オブジェクトポインタをecxにコピー
+		op_mov_RR( REG_ECX, useReg );
+
+		RELATIVE_VAR relativeVar;
+		relativeVar.dwKind=VAR_DIRECTMEM;
+
+		if( !_member_offset(
+			true,	//エラー表示あり
+			false,	//読み込み専用
+			objClass,
+			member,&relativeVar,resultType,0)){
+				return false;
+		}
+
+		if( !VarToReg( relativeVar, baseType, resultType ) ){
+			SetError(11,termFull,cp);
+		}
+
+		return true;
+	}
+
+
+	///////////////////////////////////////////////////////////////////
+	// 動的メソッドを検索
+	///////////////////////////////////////////////////////////////////
+	vector<UserProc *> userProcs;
+
+	char methodName[VN_SIZE], lpPtrOffset[VN_SIZE], parameter[VN_SIZE], dummy[1];
+	CClass::RefType refType;
+	lstrcpy( methodName, member );
+	GetVarFormatString(methodName,parameter,lpPtrOffset,dummy,refType);
+
+	objClass.EnumMethod( methodName, userProcs );
+	UserProc *pUserProc;
+	if(userProcs.size()){
+		//オーバーロードを解決
+		pUserProc=OverloadSolutionWithStrParam(termFull,userProcs,parameter,termLeft);
+
+		if( pUserProc ){
+
+			resultType = pUserProc->ReturnType();
+
+			{
+				//オブジェクトポインタをスタックに入れておく
+				//push reg
+				op_push( useReg );
+
+				if( !Opcode_CallProc(parameter,pUserProc,PROCFLAG_NEW,termLeft,0 ) ){
+
+					return false;
+				}
+
+				op_pop();
+
+				/////////////////////
+				// 戻り値の処理
+				/////////////////////
+
+				//大きな型への暗黙の変換
+				int bigType = AutoBigCast(baseType.GetBasicType(), resultType.GetBasicType() );
+
+				if( resultType.GetBasicType() != bigType ){
+					// 大きな型へ変換された場合
+					// ※レジスタの値をキャストする
+					ExtendRegToBigType( REG_EAX, bigType, resultType.GetBasicType() );
+
+					resultType.SetBasicType( bigType );
+				}
+
+				//SetUseRegFromRax(resultType.GetBasicType(),UseReg,XmmReg);
+			}
+			
+			return true;
+		}
+	}
+
+	return false;
+}
+bool TermOpe( const char *term, const Type &baseType, Type &resultType, bool &isLiteral, BOOL *pbUseHeap, bool *pIsClassName = NULL ){
+	char parameter[VN_SIZE];
+
+	// Withを解決
+	char termFull[VN_SIZE];
+	if(term[0]=='.'){
+		GetWithName(termFull);
+		lstrcat(termFull,term);
+	}
+	else lstrcpy(termFull,term);
+
+	char termLeft[VN_SIZE];
+	lstrcpy(termLeft,termFull);
+
+	// パース
+	char member[VN_SIZE];
+	CClass::RefType refType;
+	if( SplitMemberName( termFull, termLeft, member, refType ) ){
+		///////////////////////////////////////////////////////////////////
+		// オブジェクトとメンバに分解できるとき
+		// termLeft.member
+		///////////////////////////////////////////////////////////////////
+
+		isLiteral = false;
+
+		// オブジェクト側の型を取得
+		bool isClassName = false;
+		Type leftType;
+		if( !TermOpe( termLeft, baseType, leftType, isLiteral, pbUseHeap, &isClassName ) ){
+			return false;
+		}
+
+		if( isClassName ){
+			// 静的メンバ/メソッドの場合
+			goto globalArea;
+		}
+
+		if( !leftType.HasMember() ){
+			// メンバを持たない型の場合
+			return false;
+		}
+
+		return TermMemberOpe( leftType.GetClass(), baseType, resultType, termFull, termLeft, member );
+	}
+
+
+	//////////////////////////////////////////////
+	// クラス名かどうかをチェック（静的メンバ用）
+	//////////////////////////////////////////////
+
+	if( pIsClassName ){
+		if( pobj_DBClass->check( termFull ) ){
+			*pIsClassName = true;
+			return true;
+		}
+	}
+
+
+	/////////////////////////////////////////////////////////////////
+	// グローバル属性エリア
+	/////////////////////////////////////////////////////////////////
+globalArea:
+
+	const int useReg = REG_EAX;
+
+
+	if(lstrcmpi(termFull,"This")==0){
+		//Thisオブジェクト
+		resultType.SetType( DEF_OBJECT, pobj_CompilingClass );
+
+		SetThisPtrToReg( useReg );
+
+		isLiteral = false;
+
+		return true;
+	}
+
+
+	//////////////////////////////////////
+	// 関数（DLL、ユーザー定義、組み込み）
+	//////////////////////////////////////
+	char procName[VN_SIZE];
+	char temporary[8192];
+
+	int i2=GetCallProcName(termFull,procName);
+	if(termFull[i2]=='('){
+		int i4=GetStringInPare_RemovePare(parameter,termFull+i2+1);
+
+		void *pInfo;
+		int idProc=GetProc(procName,(void **)&pInfo);
+
+		if(idProc){
+			//閉じカッコ")"に続く文字がNULLでないとき
+			if(termFull[i2+1+i4+1]!='\0'){
+				SetError(42,NULL,cp);
+			}
+
+
+			{
+				////////////////
+				// 呼び出し
+				////////////////
+
+				CallProc(idProc,pInfo,procName,parameter,resultType);
+
+
+				/////////////////////
+				// 戻り値の処理
+				/////////////////////
+
+				//大きな型への暗黙の変換
+				int bigType = AutoBigCast(baseType.GetBasicType(), resultType.GetBasicType() );
+
+				/*
+				※後でNumOpe内でプッシュする
+				//スタックへプッシュ
+				PushReturnValue( resultType.GetBasicType() );
+				*/
+
+				if( resultType.GetBasicType() != bigType ){
+					// 大きな型へ変換された場合
+					// ※レジスタの値をキャストする
+					ExtendRegToBigType( useReg, bigType, resultType.GetBasicType() );
+
+					resultType.SetBasicType( bigType );
+				}
+
+				//SetUseRegFromRax(resultType.GetBasicType(),UseReg,XmmReg);
+			}
+
+
+			if(resultType.IsStruct()){
+				//構造体が戻ったときはヒープ領域にインスタンスが格納されている
+				//※後にfreeする必要あり
+				// TODO: 解放はGCに任せる
+				*pbUseHeap = 1;
+			}
+
+			isLiteral = false;
+
+			return true;
+		}
+		else if(GetConstCalcBuffer(procName,parameter,temporary)){
+			/////////////////////////
+			// マクロ関数
+			/////////////////////////
+
+			//閉じカッコ")"に続く文字がNULLでないときはエラーにする
+			if(termFull[i2+1+i4+1]!='\0') SetError(42,NULL,cp);
+
+			//マクロ関数の場合
+			NumOpe(useReg, temporary,Type(),resultType);
+
+			if(!IS_LITERAL(resultType.GetIndex())){
+				//リテラル値ではなかったとき
+				isLiteral = false;
+			}
+
+			return true;
+		}
+	}
+
+
+	////////////////////////////////
+	// インデクサ（getアクセサ）
+	////////////////////////////////
+
+	char VarName[VN_SIZE],ArrayElements[VN_SIZE];
+	GetArrayElement(termFull,VarName,ArrayElements);
+	if(ArrayElements[0]){
+		GetVarType(VarName,resultType,false);
+		if( resultType.IsObject() ){
+			CallIndexerGetterProc(/*UseReg,*/&resultType.GetClass(),VarName,ArrayElements,resultType);
+
+			isLiteral = false;
+
+			return true;
+		}
+	}
+
+
+	////////////////////////////////
+	// 変数
+	////////////////////////////////
+
+	RELATIVE_VAR relativeVar;
+	if(GetVarOffset(
+		false,	//エラー表示なし
+		false,	//読み込み専用
+		termFull,
+		&relativeVar,resultType)){
+		//////////
+		// 変数
+		//////////
+
+		if( !VarToReg( relativeVar, baseType, resultType ) ){
+			SetError(11,termFull,cp);
+		}
+
+		isLiteral = false;
+
+		return true;
+	}
+
+
+	/////////////////////////////////
+	// プロパティ用のメソッド
+	/////////////////////////////////
+
+	//配列要素を排除
+	GetArrayElement(termFull,VarName,ArrayElements);
+
+	if(GetSubHash(VarName,0)){
+
+		{
+			CallPropertyMethod(termFull,NULL,resultType);
+
+			//大きな型への暗黙の変換
+			int bigType = AutoBigCast(baseType.GetBasicType(), resultType.GetBasicType() );
+
+			if( resultType.GetBasicType() != bigType ){
+				// 大きな型へ変換された場合
+				// ※レジスタの値をキャストする
+				ExtendRegToBigType( REG_EAX, bigType, resultType.GetBasicType() );
+
+				resultType.SetBasicType( bigType );
+			}
+
+			//SetUseRegFromRax(resultType.GetBasicType(),UseReg,XmmReg);
+		}
+
+
+		if(resultType.IsStruct()){
+			//構造体が戻ったときはヒープ領域にインスタンスが格納されている
+			//※後にfreeする必要あり
+			// TODO: 解放はGCに任せる
+			*pbUseHeap = 1;
+		}
+
+		isLiteral = false;
+
+		return true;
+	}
+
+
+	return false;
+}
+
+
+bool NumOpe( int reg,
+			const char *expression,
+			const Type &baseType,
+			Type &resultType,
+			BOOL *pbUseHeap ){
+
+	if( !NumOpe( expression, baseType, resultType, pbUseHeap ) ){
+		return false;
+	}
+
+	if( reg != REG_EAX ){
+		// TODO: 未実装
+		SetError();
+	}
+
+	if( resultType.IsReal() ){
+		//fld ptr[esp]
+		op_fld_ptr_esp( resultType.GetBasicType() );
+
+		//add esp,size
+		op_add_esp( resultType.GetBasicSize() );
+	}
+	else{
+		//pop eax
+		op_pop(REG_EAX);
+
+		if( resultType.Is64() ){
+			//pop edx
+			op_pop(REG_EDX);
+		}
+	}
+	return true;
+}
 bool NumOpe( const char *expression,
 			const Type &baseType,
@@ -89,6 +515,6 @@
 			BOOL *pbUseHeap ){
 
-	int i,i2,i3,i4;
-	char temporary[1024],temp2[1024],temp3[1024];
+	int i,i2,i3;
+	char temporary[1024],temp2[1024];
 
 	if(expression[0]=='\0'){
@@ -260,4 +686,22 @@
 				term=values[i];
 
+				if( calc[i+1]%100 == CALC_AS ){
+					// As演算子の右辺値
+					//型名
+					if( Type::StringToType( term, resultType ) ){
+						resultType.SetBasicType( resultType.GetBasicType() | FLAG_CAST );
+					}
+					else{
+						SetError(3, term, cp );
+						goto error;
+					}
+
+					type_stack[sp] = resultType.GetBasicType();
+					index_stack[sp] = resultType.GetIndex();
+					sp++;
+
+					break;
+				}
+
 				if(term[0]=='\"'){
 					//リテラル文字列
@@ -269,19 +713,17 @@
 StrLiteral:
 
-					if( baseType.IsObject() ){
-						if( baseType.IsStringObject() ){
-							//要求タイプがStringのとき
-
-							//String型オブジェクトを生成
-							NewStringObject(term);
-
-							extern CClass *pobj_StringClass;
-							type_stack[sp]=DEF_OBJECT;
-							index_stack[sp]=(LONG_PTR)pobj_StringClass;
-							bLiteralCalculation=0;
-
-							sp++;
-							break;
-						}
+					if( baseType.IsObject() || baseType.IsNull() ){
+						//要求タイプがオブジェクト、または未定のとき
+
+						//String型オブジェクトを生成
+						NewStringObject(term);
+
+						extern CClass *pobj_StringClass;
+						type_stack[sp]=DEF_OBJECT;
+						index_stack[sp]=(LONG_PTR)pobj_StringClass;
+						bLiteralCalculation=0;
+
+						sp++;
+						break;
 					}
 
@@ -317,119 +759,52 @@
 					// 何らかの識別子
 
-					//////////////////////////////////////
-					// 関数（DLL、ユーザー定義、組み込み）
-					//////////////////////////////////////
-
-					i2=GetCallProcName(term,temporary);
-					if(term[i2]=='('){
-						i4=GetStringInPare_RemovePare(temp2,term+i2+1);
-
-						void *pInfo;
-						int idProc=GetProc(temporary,(void **)&pInfo);
-
-						Type resultType;
-						if(idProc){
-							//閉じカッコ")"に続く文字がNULLでないとき
-							if(term[i2+1+i4+1]!='\0'){
-								if( term[i2+1+i4+1] == '.'
-									|| term[i2+1+i4+1] == 1 && term[i2+1+i4+2] == ESC_PSMEM ){
-										goto NonProc;
+					bool isLiteral;
+					if( TermOpe( term, baseType, resultType, isLiteral, &bUseHeap[sp] ) ){
+						if(resultType.IsNull()){
+							//戻り値が存在しないとき
+							for(i2=0;;i2++){
+								if(term[i2]=='('||term[i2]=='\0'){
+									term[i2]=0;
+									break;
+								}
+							}
+							SetError(38,term,cp);
+
+							goto error;
+						}
+
+						type_stack[sp] = resultType.GetBasicType();
+						index_stack[sp] = resultType.GetIndex();
+
+						if( !isLiteral ){
+							bLiteralCalculation=0;
+						}
+
+						if( resultType.GetBasicType() & FLAG_CAST ){
+							// 型名のみ
+							SetError();
+						}
+						else{
+							if( resultType.IsReal() ){
+								//sub esp,size
+								//fstp ptr[esp]
+								op_fstp_push( resultType );
+							}
+							else{
+								if( resultType.Is64() ){
+									//push edx
+									op_push( REG_EDX );
 								}
 								else{
-									SetError(42,NULL,cp);
+									ExtendTypeTo32( resultType.GetBasicType(), REG_EAX );
 								}
+
+								//push eax
+								op_push( REG_EAX );
 							}
-
-							////////////////
-							// 呼び出し
-							////////////////
-
-							CallProc(idProc,pInfo,temporary,temp2,resultType);
-							if(resultType.IsNull()){
-								//戻り値が存在しないとき
-								for(i2=2;;i2++){
-									if(term[i2]=='('||term[i2]=='\0'){
-										term[i2]=0;
-										break;
-									}
-								}
-								SetError(38,term,cp);
-
-								goto error;
-							}
-
-
-							/////////////////////
-							// 戻り値の処理
-							/////////////////////
-
-							//大きな型への暗黙の変換
-							type_stack[sp]=AutoBigCast(baseType.GetBasicType(),resultType.GetBasicType());
-							index_stack[sp] = resultType.GetIndex();
-							bLiteralCalculation=0;
-
-							//スタックへプッシュ
-							PushReturnValue( resultType.GetBasicType() );
-
-							if( Is64Type(type_stack[sp])
-								&& resultType.IsWhole()
-								&& resultType.GetBasicSize() <= sizeof(long) ){
-									//必要に応じて64ビット拡張
-									ExtendStackTo64( resultType.GetBasicType() );
-							}
-
-							if( resultType.IsStruct() ){
-								//構造体が戻ったときはヒープ領域にインスタンスが格納されている
-								//※後にfreeする必要あり
-								bUseHeap[sp]=1;
-							}
-
-							sp++;
-							break;
 						}
-						else if(GetConstCalcBuffer(temporary,temp2,temp3)){
-							/////////////////////////
-							// マクロ関数
-							/////////////////////////
-
-							//閉じカッコ")"に続く文字がNULLでないときはエラーにする
-							if(term[i2+1+i4+1]!='\0') SetError(42,NULL,cp);
-
-							//マクロ関数の場合
-							NumOpe(temp3,Type(),resultType);
-
-							if(!IS_LITERAL(resultType.GetIndex())){
-								//リテラル値ではなかったとき
-								bLiteralCalculation=0;
-							}
-
-							type_stack[sp] = resultType.GetBasicType();
-							index_stack[sp] = resultType.GetIndex();
-
-							sp++;
-							break;
-						}
-					}
-NonProc:
-
-
-					//インデクサ（getアクセサ）
-					char variable[VN_SIZE],array_element[VN_SIZE];
-					GetArrayElement(term,variable,array_element);
-					if(array_element[0]){
-						Type resultType;
-						GetVarType(variable,resultType,0);
-						if( resultType.IsObject() ){
-							CallIndexerGetterProc(&resultType.GetClass(),variable,array_element,resultType);
-							type_stack[sp]=resultType.GetBasicType();
-							index_stack[sp]=resultType.GetIndex();
-							bLiteralCalculation=0;
-
-							//push eax
-							op_push(REG_EAX);
-
-							sp++;
-							break;
-						}
+
+						sp++;
+						break;
 					}
 
@@ -451,69 +826,4 @@
 						//push 0
 						op_push_V( 0 );
-
-						sp++;
-						break;
-					}
-
-					RELATIVE_VAR RelativeVar;
-					Type varType;
-					if(GetVarOffset(
-						false,	//エラー表示あり
-						false,	//読み込み専用
-						term,
-						&RelativeVar,varType)){
-						//////////
-						// 変数
-						//////////
-
-						//大きな型への暗黙の変換
-						type_stack[sp]=AutoBigCast(baseType.GetBasicType(),varType.GetBasicType());
-						index_stack[sp] = varType.GetIndex();
-						bLiteralCalculation=0;
-
-						if(varType.GetBasicType()&FLAG_PTR){
-							//配列ポインタ
-							type_stack[sp]=GetPtrType(varType.GetBasicType()^FLAG_PTR);
-
-							SetVarPtrToEax(&RelativeVar);
-
-							//push eax
-							op_push(REG_EAX);
-						}
-						else if( varType.IsStruct() ){
-							//構造体ポインタをeaxへ格納（構造体は値型）
-							SetVarPtrToEax(&RelativeVar);
-
-							//push eax
-							op_push(REG_EAX);
-						}
-						else if( varType.GetBasicSize() == sizeof(_int64) ){
-							//64ビット型
-							PushDoubleVariable(&RelativeVar);
-						}
-						else if( varType.GetBasicSize() == sizeof(long) ){
-							//32ビット型
-							PushLongVariable(&RelativeVar);
-						}
-						else if( varType.IsInteger() ){
-							PushIntegerVariable(&RelativeVar);
-						}
-						else if( varType.IsWord() ){
-							PushWordVariable(&RelativeVar);
-						}
-						else if( varType.IsSByte() ){
-							PushCharVariable(&RelativeVar);
-						}
-						else if( varType.IsByte() || varType.IsBoolean() ){
-							PushByteVariable(&RelativeVar);
-						}
-						else SetError(11,term,cp);
-
-						if( Is64Type(type_stack[sp])
-							&& varType.IsWhole()
-							&& varType.GetBasicSize()<=sizeof(long)){
-							//必要に応じて64ビット拡張
-								ExtendStackTo64( varType.GetBasicType() );
-						}
 
 						sp++;
@@ -556,48 +866,4 @@
 
 
-					//////////////
-					// 型名の場合
-					//////////////
-					Type tempType;
-					if( Type::StringToType( term, tempType ) ){
-						type_stack[sp] = tempType.GetBasicType() | FLAG_CAST;
-						index_stack[sp] = tempType.GetIndex();
-						sp++;
-						break;
-					}
-
-
-					/////////////////////////////////
-					// プロパティ用のメソッド
-					/////////////////////////////////
-
-					//配列要素を排除
-					char VarName[VN_SIZE],ArrayElements[VN_SIZE];
-					GetArrayElement(term,VarName,ArrayElements);
-
-					if(GetSubHash(VarName,0)){
-						Type resultType;
-						CallPropertyMethod(term,NULL,resultType);
-
-						//大きな型への暗黙の変換
-						type_stack[sp]=AutoBigCast(baseType.GetBasicType(),resultType.GetBasicType());
-						index_stack[sp]=resultType.GetIndex();
-						bLiteralCalculation=0;
-
-						//スタックへプッシュ
-						PushReturnValue( resultType.GetBasicType() );
-
-						if(type_stack[sp]==DEF_STRUCT){
-							//構造体が戻ったときはヒープ領域にインスタンスが格納されている
-							//※後にfreeする必要あり
-							bUseHeap[sp]=1;
-						}
-
-						sp++;
-						break;
-					}
-
-
-
 					//該当する識別子が見当たらないときはエラー扱いにする
 					bError=1;
Index: /BasicCompiler32/NumOpe_Relation.cpp
===================================================================
--- /BasicCompiler32/NumOpe_Relation.cpp	(revision 96)
+++ /BasicCompiler32/NumOpe_Relation.cpp	(revision 97)
@@ -1,4 +1,28 @@
 #include "../BasicCompiler_Common/common.h"
 #include "Opcode.h"
+
+void AutoExtendToBigType( int *type_stack,int sp, int reg1, int reg2 ){
+	/*
+	int bigSize = GetTypeSize( type_stack[sp-1], -1 );
+	if( bigSize != GetTypeSize( type_stack[sp-2], -1 ) ){
+		int extReg = reg2;
+		int oldType = type_stack[sp-2];
+		if( bigSize < GetTypeSize( type_stack[sp-2], -1 ) ){
+			bigSize = GetTypeSize( type_stack[sp-2], -1 );
+			extReg = reg1;
+			oldType = type_stack[sp-1];
+		}
+		if( bigSize == 2 ){
+			ExtendTypeTo16( oldType, extReg );
+		}
+		else if( bigSize == 4 ){
+			ExtendTypeTo32( oldType, extReg );
+		}
+		else{
+			SetError();
+		}
+	}*/
+}
+
 
 BOOL Calc_Relation_PE(int *type_stack,LONG_PTR *index_stack,int *pStackPointer){
@@ -195,4 +219,7 @@
 		//pop eax
 		op_pop(REG_EAX);
+
+		// どちらかのサイズが足りない場合は自動拡張する
+		AutoExtendToBigType( type_stack, sp, REG_EAX, REG_EBX );
 
 		//sub esp,4
@@ -434,4 +461,7 @@
 		op_pop(REG_EAX);
 
+		// どちらかのサイズが足りない場合は自動拡張する
+		AutoExtendToBigType( type_stack, sp, REG_EAX, REG_EBX );
+
 		//sub esp,4
 		op_sub_esp(4);
@@ -675,4 +705,7 @@
 		op_pop(REG_EAX);
 
+		// どちらかのサイズが足りない場合は自動拡張する
+		AutoExtendToBigType( type_stack, sp, REG_EAX, REG_EBX );
+
 		//sub esp,4
 		op_sub_esp(4);
@@ -911,4 +944,7 @@
 		//pop eax
 		op_pop(REG_EAX);
+
+		// どちらかのサイズが足りない場合は自動拡張する
+		AutoExtendToBigType( type_stack, sp, REG_EAX, REG_EBX );
 
 		//sub esp,4
@@ -1115,4 +1151,7 @@
 		op_pop(REG_EBX);
 
+		// どちらかのサイズが足りない場合は自動拡張する
+		AutoExtendToBigType( type, sp, REG_EAX, REG_EBX );
+
 		//sub esp,4
 		op_sub_esp(4);
@@ -1306,4 +1345,7 @@
 		op_pop(REG_EBX);
 
+		// どちらかのサイズが足りない場合は自動拡張する
+		AutoExtendToBigType( type, sp, REG_EAX, REG_EBX );
+
 		//sub esp,4
 		op_sub_esp(4);
Index: /BasicCompiler32/Opcode.h
===================================================================
--- /BasicCompiler32/Opcode.h	(revision 96)
+++ /BasicCompiler32/Opcode.h	(revision 97)
@@ -102,4 +102,9 @@
 //NumOpe.cpp
 void PushReturnValue(int type);
+bool NumOpe( int reg,
+			const char *expression,
+			const Type &baseType,
+			Type &resultType,
+			BOOL *pbUseHeap = NULL );
 bool NumOpe( const char *Command,
 		   const Type &baseType,
@@ -151,4 +156,7 @@
 void Set8Variable(int type,DWORD VarKind,DWORD offset,BOOL bOffsetOffset);
 void SetBooleanVariable(int type,RELATIVE_VAR *pRelative);
+void ExtendTypeTo64(int type);
+void ExtendTypeTo32(int type,int reg);
+void ExtendTypeTo16(int type,int reg);
 
 //increment.cpp
@@ -168,5 +176,5 @@
 //Compile_Calc_PushVar.cpp
 void SetReg_RealVariable(int type,RELATIVE_VAR *pRelativeVar);
-void SetReg_WholeVariable(int type,RELATIVE_VAR *pRelativeVar,int reg);
+void SetReg_WholeVariable(int type,RELATIVE_VAR *pRelativeVar,int reg, bool is64Head = false);
 void PushDoubleVariable(RELATIVE_VAR *pRelativeVar);
 void PushLongVariable(RELATIVE_VAR *pRelativeVar);
@@ -182,5 +190,5 @@
 //Compile_Var.cpp
 void SetRelativeOffset( RELATIVE_VAR &relativeVar );
-void GetWithName(char *buffer);
+bool _member_offset(bool isErrorEnabled, bool isWriteAccess, const CClass &objClass, const char *member, RELATIVE_VAR *pRelativeVar, Type &resultType, BOOL bPrivateAccess);
 void SetThisPtrToReg(int reg);
 bool GetVarOffset(bool isErrorEnabled,bool isWriteAccess,const char *NameBuffer,RELATIVE_VAR *pRelativeVar,Type &resultType,int *pss = 0);
@@ -192,4 +200,5 @@
 void dim( char *VarName,int *SubScripts,Type &type,char *InitBuf,char *ConstractParameter,DWORD dwFlags);
 void SetVarPtrToEax(RELATIVE_VAR *pRelativeVar);
+void SetVarPtrToReg(int reg,RELATIVE_VAR *pRelativeVar);
 bool Compile_AddGlobalRootsForGc();
 
@@ -314,5 +323,5 @@
 void op_push(int reg);
 void op_push_V(long data);
-void op_pop(int reg);
+void op_pop(int reg = REG_NON);
 void op_add_esp(int num);
 void op_sub_esp(int num);
@@ -328,4 +337,5 @@
 void op_fstp_base_offset	(int type,int base_reg,int offset);
 void op_fstp_base_offset_ex	(int type,int base_reg1,int base_reg2,int offset,BOOL bUseOffset);
+void op_fstp_push			( Type &type );
 void op_fistp_ptr_esp		( int typeSize );
 void op_zero_reg(int reg);
Index: /BasicCompiler32/op32_main.cpp
===================================================================
--- /BasicCompiler32/op32_main.cpp	(revision 96)
+++ /BasicCompiler32/op32_main.cpp	(revision 97)
@@ -864,4 +864,10 @@
 		SetError();
 	}
+}
+void op_fstp_push( Type &type ){
+	//sub esp,size
+	op_sub_esp( type.GetBasicSize() );
+
+	op_fstp_basereg( type.GetBasicType(), REG_ESP );
 }
 
Index: /BasicCompiler64/BasicCompiler.vcproj
===================================================================
--- /BasicCompiler64/BasicCompiler.vcproj	(revision 96)
+++ /BasicCompiler64/BasicCompiler.vcproj	(revision 97)
@@ -385,4 +385,106 @@
 				IgnoreDefaultLibraryNames="libcpmtd"
 				GenerateDebugInformation="false"
+				ProgramDatabaseFile=".\Release/BasicCompiler64.pdb"
+				SubSystem="2"
+				TargetMachine="0"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+				AdditionalManifestFiles="$(ProjectDir)\manifest.xml"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile="$(OutDir)/$(ProjectName).bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="test_release|Win32"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="true"
+				SuppressStartupBanner="true"
+				TargetEnvironment="1"
+				TypeLibraryName=".\Debug/BasicCompiler.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\cpplibs\boost;..\BasicCompiler_Common\include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;JPN;_AMD64_;_WIN64"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				PrecompiledHeaderFile=".\Release/BasicCompiler.pch"
+				AssemblerListingLocation=".\Release/"
+				ObjectFile=".\Release/"
+				ProgramDataBaseFileName=".\Release/"
+				BrowseInformation="0"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				CallingConvention="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG,JPN"
+				Culture="1041"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalOptions="/MACHINE:AMD64"
+				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib bufferoverflowu.lib"
+				OutputFile="../ActiveBasic/BasicCompiler64.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				IgnoreDefaultLibraryNames="libcpmtd"
+				GenerateDebugInformation="true"
 				ProgramDatabaseFile=".\Release/BasicCompiler64.pdb"
 				SubSystem="2"
@@ -578,4 +680,12 @@
 					/>
 				</FileConfiguration>
+				<FileConfiguration
+					Name="test_release|Win32"
+					>
+					<Tool
+						Name="VCResourceCompilerTool"
+						PreprocessorDefinitions="_DEBUG;JPN;$(NoInherit)"
+					/>
+				</FileConfiguration>
 			</File>
 			<Filter
@@ -624,4 +734,14 @@
 						/>
 					</FileConfiguration>
+					<FileConfiguration
+						Name="test_release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"
+							UsePrecompiledHeader="0"
+							BrowseInformation="0"
+						/>
+					</FileConfiguration>
 				</File>
 				<File
@@ -667,4 +787,14 @@
 						/>
 					</FileConfiguration>
+					<FileConfiguration
+						Name="test_release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"
+							UsePrecompiledHeader="0"
+							BrowseInformation="0"
+						/>
+					</FileConfiguration>
 				</File>
 				<File
@@ -710,4 +840,14 @@
 						/>
 					</FileConfiguration>
+					<FileConfiguration
+						Name="test_release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"
+							UsePrecompiledHeader="0"
+							BrowseInformation="0"
+						/>
+					</FileConfiguration>
 				</File>
 				<File
@@ -745,4 +885,14 @@
 					<FileConfiguration
 						Name="Release2|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"
+							UsePrecompiledHeader="0"
+							BrowseInformation="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="test_release|Win32"
 						>
 						<Tool
@@ -800,4 +950,14 @@
 							/>
 						</FileConfiguration>
+						<FileConfiguration
+							Name="test_release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"
+								UsePrecompiledHeader="0"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
 					</File>
 					<File
@@ -843,4 +1003,14 @@
 							/>
 						</FileConfiguration>
+						<FileConfiguration
+							Name="test_release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"
+								UsePrecompiledHeader="0"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
 					</File>
 					<File
@@ -886,4 +1056,14 @@
 							/>
 						</FileConfiguration>
+						<FileConfiguration
+							Name="test_release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"
+								UsePrecompiledHeader="0"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
 					</File>
 					<File
@@ -933,4 +1113,14 @@
 							/>
 						</FileConfiguration>
+						<FileConfiguration
+							Name="test_release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"
+								UsePrecompiledHeader="0"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
 					</File>
 					<File
@@ -976,4 +1166,14 @@
 							/>
 						</FileConfiguration>
+						<FileConfiguration
+							Name="test_release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"
+								UsePrecompiledHeader="0"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
 					</File>
 					<File
@@ -1019,4 +1219,14 @@
 							/>
 						</FileConfiguration>
+						<FileConfiguration
+							Name="test_release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"
+								UsePrecompiledHeader="0"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
 					</File>
 					<File
@@ -1062,4 +1272,14 @@
 							/>
 						</FileConfiguration>
+						<FileConfiguration
+							Name="test_release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"
+								UsePrecompiledHeader="0"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
 					</File>
 					<File
@@ -1097,4 +1317,14 @@
 						<FileConfiguration
 							Name="Release2|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"
+								UsePrecompiledHeader="0"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="test_release|Win32"
 							>
 							<Tool
@@ -1160,4 +1390,14 @@
 							/>
 						</FileConfiguration>
+						<FileConfiguration
+							Name="test_release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"
+								UsePrecompiledHeader="0"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
 					</File>
 					<File
@@ -1219,4 +1459,14 @@
 							/>
 						</FileConfiguration>
+						<FileConfiguration
+							Name="test_release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"
+								UsePrecompiledHeader="0"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
 					</File>
 					<File
@@ -1254,4 +1504,14 @@
 						<FileConfiguration
 							Name="Release2|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;JPN;$(NoInherit)"
+								UsePrecompiledHeader="0"
+								BrowseInformation="0"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="test_release|Win32"
 							>
 							<Tool
@@ -1435,4 +1695,13 @@
 						<FileConfiguration
 							Name="Release2|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\$(InputName)1.obj"
+								XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="test_release|Win32"
 							>
 							<Tool
Index: /BasicCompiler64/BasicCompiler64.sln
===================================================================
--- /BasicCompiler64/BasicCompiler64.sln	(revision 96)
+++ /BasicCompiler64/BasicCompiler64.sln	(revision 97)
@@ -9,4 +9,5 @@
 		English_Rel|Win32 = English_Rel|Win32
 		Release|Win32 = Release|Win32
+		test_release|Win32 = test_release|Win32
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
@@ -17,4 +18,6 @@
 		{864B921B-423B-4F9E-9E6B-31B15968EDF9}.Release|Win32.ActiveCfg = Release2|Win32
 		{864B921B-423B-4F9E-9E6B-31B15968EDF9}.Release|Win32.Build.0 = Release2|Win32
+		{864B921B-423B-4F9E-9E6B-31B15968EDF9}.test_release|Win32.ActiveCfg = test_release|Win32
+		{864B921B-423B-4F9E-9E6B-31B15968EDF9}.test_release|Win32.Build.0 = test_release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
Index: /BasicCompiler64/Compile_CallProc.cpp
===================================================================
--- /BasicCompiler64/Compile_CallProc.cpp	(revision 96)
+++ /BasicCompiler64/Compile_CallProc.cpp	(revision 97)
@@ -96,4 +96,5 @@
 
 bool Opcode_CallProc(const char *Parameter,UserProc *pUserProc,DWORD dwFlags,const char *ObjectName,int RefType){
+	// TODO: RefTypeは不必要なので削除する
 	int i2;
 
@@ -120,5 +121,5 @@
 	if( pUserProc->GetParentClassPtr() ){
 		//クラスのメンバ関数を呼び出す場合はアクセスチェックを行う
-		if(ObjectName[0]){
+		if(ObjectName[0] && (dwFlags&PROCFLAG_NEW)==0){
 			if(lstrcmpi(ObjectName,"Super")==0){
 				//クラスメンバ関数内から基底クラスの呼び出し
@@ -303,5 +304,5 @@
 		///////////////////////////////
 
-		if(ObjectName[0]){
+		if(ObjectName[0] && (dwFlags&PROCFLAG_NEW)==0){
 			if(lstrcmpi(ObjectName,"Super")==0) goto InClassMember;
 			else{
Index: /BasicCompiler64/Compile_Func.cpp
===================================================================
--- /BasicCompiler64/Compile_Func.cpp	(revision 96)
+++ /BasicCompiler64/Compile_Func.cpp	(revision 97)
@@ -57,5 +57,5 @@
 	}
 
-	if( type.IsStringObject() ){
+	if( type.IsStringClass() ){
 		//Stringオブジェクトの場合
 		sprintf(temporary,"%s.Length",tempParm);
Index: /BasicCompiler64/Compile_Statement.cpp
===================================================================
--- /BasicCompiler64/Compile_Statement.cpp	(revision 96)
+++ /BasicCompiler64/Compile_Statement.cpp	(revision 97)
@@ -58,5 +58,7 @@
 
 		if(pUserProc){
-			if( !pUserProc->IsMacro() ) SetError(10,Command,cp);
+			if( !pUserProc->IsMacro() ){
+				SetError(10,Command,cp);
+			}
 
 			Opcode_CallProc("",pUserProc,0,"",0);
Index: /BasicCompiler64/Compile_Var.cpp
===================================================================
--- /BasicCompiler64/Compile_Var.cpp	(revision 96)
+++ /BasicCompiler64/Compile_Var.cpp	(revision 97)
@@ -366,12 +366,4 @@
 	return true;
 }
-void GetWithName(char *buffer){
-	extern WITHINFO WithInfo;
-	int i;
-
-	buffer[0]=0;
-	for(i=0;i<WithInfo.num;i++)
-		lstrcat(buffer,WithInfo.ppName[i]);
-}
 
 int LocalVar_ThisPtrOffset;
@@ -401,4 +393,8 @@
 		//例: func().member
 
+		// TODO: 消す
+		SetError();
+		return false;
+		/*
 		void *pInfo;
 		int idProc=GetProc(VarName,(void **)&pInfo);
@@ -435,5 +431,5 @@
 
 			return true;
-		}
+		}*/
 	}
 
@@ -864,5 +860,5 @@
 	}
 	else if( type.Is64() || type.IsPointer() ){
-		if(type.GetBasicType()==typeOfPtrChar && type.GetIndex()==LITERAL_STRING){
+		if(type.GetBasicType()==typeOfPtrChar){
 			//文字列定数のとき
 
@@ -1010,5 +1006,5 @@
 	}
 	else if( type.Is64() || type.IsPointer() ){
-		if(type.GetBasicType()==typeOfPtrChar && type.GetIndex()==LITERAL_STRING){
+		if(type.GetBasicType()==typeOfPtrChar ){
 			//文字列定数のとき
 
Index: /BasicCompiler64/NumOpe.cpp
===================================================================
--- /BasicCompiler64/NumOpe.cpp	(revision 96)
+++ /BasicCompiler64/NumOpe.cpp	(revision 97)
@@ -83,4 +83,418 @@
 }
 
+
+bool VarToReg( RELATIVE_VAR &relativeVar, const Type &baseType, Type &resultType ){
+	int UseReg=pobj_reg->GetNextReg();
+	int XmmReg=pobj_reg->GetNextXmmReg();
+
+	//大きな型への暗黙の変換
+	int bigType = AutoBigCast(baseType.GetBasicType(),resultType.GetBasicType());
+
+	if(resultType.GetBasicType()&FLAG_PTR){
+		//配列ポインタ
+		resultType.SetBasicType( GetPtrType(resultType.GetBasicType()^FLAG_PTR) );
+
+		SetVarPtrToReg(UseReg,&relativeVar);
+	}
+	else if(resultType.IsReal()){
+		//実数型
+		if( resultType.IsDouble() )
+			SetXmmReg_DoubleVariable(&relativeVar,XmmReg);
+		if( resultType.IsSingle() )
+			SetXmmReg_SingleVariable(&relativeVar,XmmReg);
+	}
+	else if( resultType.IsWhole() || resultType.IsObject()){
+		//整数型
+		SetReg_WholeVariable(resultType.GetBasicType(),&relativeVar,UseReg);
+	}
+	else if( resultType.IsStruct() ){
+		//構造体ポインタをUseRegへ格納（構造体は値型）
+		SetVarPtrToReg(UseReg,&relativeVar);
+	}
+	else{
+		return false;
+	}
+
+	if( resultType.GetBasicType() != bigType ){
+		// 大きな型へ変換された場合
+		// ※レジスタの値をキャストする
+		ExtendRegToBigType( UseReg, bigType, resultType.GetBasicType() );
+
+		resultType.SetBasicType( bigType );
+	}
+
+	return true;
+}
+bool TermMemberOpe( const CClass &objClass, const Type &baseType, Type &resultType, const char *termFull, const char *termLeft, const char *member ){
+
+	int UseReg=pobj_reg->GetNextReg();
+	int XmmReg=pobj_reg->GetNextXmmReg();
+
+
+	if( GetMemberType( objClass, member, resultType, 0, false ) ){
+		// メンバが見つかったとき
+
+		//オブジェクトポインタをr11にコピー
+		op_mov_RR( REG_R11, UseReg );
+
+		RELATIVE_VAR relativeVar;
+		relativeVar.dwKind=VAR_DIRECTMEM;
+
+		if( !_member_offset(
+			true,	//エラー表示あり
+			false,	//読み込み専用
+			objClass,
+			member,&relativeVar,resultType,0)){
+				return false;
+		}
+
+		if( !VarToReg( relativeVar, baseType, resultType ) ){
+			SetError(11,termFull,cp);
+		}
+
+		return true;
+	}
+
+
+	///////////////////////////////////////////////////////////////////
+	// 動的メソッドを検索
+	///////////////////////////////////////////////////////////////////
+	vector<UserProc *> userProcs;
+
+	char methodName[VN_SIZE], lpPtrOffset[VN_SIZE], parameter[VN_SIZE], dummy[1];
+	CClass::RefType refType;
+	lstrcpy( methodName, member );
+	GetVarFormatString(methodName,parameter,lpPtrOffset,dummy,refType);
+
+	objClass.EnumMethod( methodName, userProcs );
+	UserProc *pUserProc;
+	if(userProcs.size()){
+		//オーバーロードを解決
+		pUserProc=OverloadSolutionWithStrParam(termFull,userProcs,parameter,termLeft);
+
+		if( pUserProc ){
+
+			resultType = pUserProc->ReturnType();
+
+
+			//////////////////////////////////////////////////////
+			/////    レジスタ資源のバックアップ
+			{	BACKUP_REGISTER_RESOURCE
+			//////////////////////////////////////////////////////
+
+				//オブジェクトポインタをスタックに入れておく
+				//mov qword ptr[rsp+offset],reg     ※スタックフレームを利用
+				pobj_sf->push( UseReg );
+
+				if( !Opcode_CallProc(parameter,pUserProc,PROCFLAG_NEW,termLeft,0 ) ){
+					//レジスタ資源を復元
+					RESTORE_REGISTER_RESOURCE
+
+					return false;
+				}
+
+				pobj_sf->pop();
+
+				/////////////////////
+				// 戻り値の処理
+				/////////////////////
+
+				//大きな型への暗黙の変換
+				int bigType = AutoBigCast(baseType.GetBasicType(), resultType.GetBasicType() );
+
+				if( resultType.GetBasicType() != bigType ){
+					// 大きな型へ変換された場合
+					// ※レジスタの値をキャストする
+					ExtendRegToBigType( REG_RAX, bigType, resultType.GetBasicType() );
+
+					resultType.SetBasicType( bigType );
+				}
+
+				SetUseRegFromRax(resultType.GetBasicType(),UseReg,XmmReg);
+
+
+			/////////////////////////////////////////////
+			//////   レジスタ資源を復元
+				RESTORE_REGISTER_RESOURCE
+			}////////////////////////////////////////////
+			
+			return true;
+		}
+	}
+
+	return false;
+}
+bool TermOpe( const char *term, const Type &baseType, Type &resultType, bool &isLiteral, BOOL *pbUseHeap, bool *pIsClassName = NULL ){
+	char parameter[VN_SIZE];
+
+	// Withを解決
+	char termFull[VN_SIZE];
+	if(term[0]=='.'){
+		GetWithName(termFull);
+		lstrcat(termFull,term);
+	}
+	else lstrcpy(termFull,term);
+
+	char termLeft[VN_SIZE];
+	lstrcpy(termLeft,termFull);
+
+	if( (string)term=="DayOfWeek"){
+		int test=0;
+	}
+
+	// パース
+	char member[VN_SIZE];
+	CClass::RefType refType;
+	if( SplitMemberName( termFull, termLeft, member, refType ) ){
+		///////////////////////////////////////////////////////////////////
+		// オブジェクトとメンバに分解できるとき
+		// termLeft.member
+		///////////////////////////////////////////////////////////////////
+
+		isLiteral = false;
+
+		// オブジェクト側の型を取得
+		bool isClassName = false;
+		Type leftType;
+		if( !TermOpe( termLeft, baseType, leftType, isLiteral, pbUseHeap, &isClassName ) ){
+			return false;
+		}
+
+		if( isClassName ){
+			// 静的メンバ/メソッドの場合
+			goto globalArea;
+		}
+
+		if( !leftType.HasMember() ){
+			// メンバを持たない型の場合
+			return false;
+		}
+
+		return TermMemberOpe( leftType.GetClass(), baseType, resultType, termFull, termLeft, member );
+	}
+
+
+	//////////////////////////////////////////////
+	// クラス名かどうかをチェック（静的メンバ用）
+	//////////////////////////////////////////////
+
+	if( pIsClassName ){
+		if( pobj_DBClass->check( termFull ) ){
+			*pIsClassName = true;
+			return true;
+		}
+	}
+
+
+	/////////////////////////////////////////////////////////////////
+	// グローバル属性エリア
+	/////////////////////////////////////////////////////////////////
+globalArea:
+
+	int UseReg=pobj_reg->GetNextReg();
+	int XmmReg=pobj_reg->GetNextXmmReg();
+
+
+	if(lstrcmpi(termFull,"This")==0){
+		//Thisオブジェクト
+		resultType.SetType( DEF_OBJECT, pobj_CompilingClass );
+
+		SetThisPtrToReg( UseReg );
+
+		isLiteral = false;
+
+		return true;
+	}
+
+
+	//////////////////////////////////////
+	// 関数（DLL、ユーザー定義、組み込み）
+	//////////////////////////////////////
+	char procName[VN_SIZE];
+	char temporary[8192];
+
+	int i2=GetCallProcName(termFull,procName);
+	if(termFull[i2]=='('){
+		int i4=GetStringInPare_RemovePare(parameter,termFull+i2+1);
+
+		void *pInfo;
+		int idProc=GetProc(procName,(void **)&pInfo);
+
+		if(idProc){
+			//閉じカッコ")"に続く文字がNULLでないとき
+			if(termFull[i2+1+i4+1]!='\0'){
+				SetError(42,NULL,cp);
+			}
+
+
+			//////////////////////////////////////////////////////
+			/////    レジスタ資源のバックアップ
+			{	BACKUP_REGISTER_RESOURCE
+			//////////////////////////////////////////////////////
+
+
+				////////////////
+				// 呼び出し
+				////////////////
+
+				CallProc(idProc,pInfo,procName,parameter,resultType);
+
+
+				/////////////////////
+				// 戻り値の処理
+				/////////////////////
+
+				//大きな型への暗黙の変換
+				int bigType = AutoBigCast(baseType.GetBasicType(), resultType.GetBasicType() );
+
+				if( resultType.GetBasicType() != bigType ){
+					// 大きな型へ変換された場合
+					// ※レジスタの値をキャストする
+					ExtendRegToBigType( REG_RAX, bigType, resultType.GetBasicType() );
+
+					resultType.SetBasicType( bigType );
+				}
+
+				SetUseRegFromRax(resultType.GetBasicType(),UseReg,XmmReg);
+
+			/////////////////////////////////////////////
+			//////   レジスタ資源を復元
+				RESTORE_REGISTER_RESOURCE
+			}////////////////////////////////////////////
+
+			if(resultType.IsStruct()){
+				//構造体が戻ったときはヒープ領域にインスタンスが格納されている
+				//※後にfreeする必要あり
+				// TODO: 解放はGCに任せる
+				*pbUseHeap = 1;
+			}
+
+			isLiteral = false;
+
+			return true;
+		}
+		else if(GetConstCalcBuffer(procName,parameter,temporary)){
+			/////////////////////////
+			// マクロ関数
+			/////////////////////////
+
+			//閉じカッコ")"に続く文字がNULLでないときはエラーにする
+			if(termFull[i2+1+i4+1]!='\0') SetError(42,NULL,cp);
+
+			//マクロ関数の場合
+			NumOpe(&UseReg,temporary,Type(),resultType);
+
+			if(!IS_LITERAL(resultType.GetIndex())){
+				//リテラル値ではなかったとき
+				isLiteral = false;
+			}
+
+			return true;
+		}
+	}
+
+
+	////////////////////////////////
+	// インデクサ（getアクセサ）
+	////////////////////////////////
+
+	char VarName[VN_SIZE],ArrayElements[VN_SIZE];
+	GetArrayElement(termFull,VarName,ArrayElements);
+	if(ArrayElements[0]){
+		GetVarType(VarName,resultType,false);
+		if( resultType.IsObject() ){
+			CallIndexerGetterProc(UseReg,&resultType.GetClass(),VarName,ArrayElements,resultType);
+
+			isLiteral = false;
+
+			return true;
+		}
+	}
+
+
+	////////////////////////////////
+	// 変数
+	////////////////////////////////
+
+	RELATIVE_VAR relativeVar;
+	if(GetVarOffset(
+		false,	//エラー表示なし
+		false,	//読み込み専用
+		termFull,
+		&relativeVar,resultType)){
+		//////////
+		// 変数
+		//////////
+
+		if( !VarToReg( relativeVar, baseType, resultType ) ){
+			SetError(11,termFull,cp);
+		}
+
+		isLiteral = false;
+
+		return true;
+	}
+
+/*
+	////////////////////////////////
+	// 型名
+	////////////////////////////////
+
+	if( Type::StringToType( termFull, resultType ) ){
+		resultType.SetBasicType( resultType.GetBasicType() | FLAG_CAST );
+		return true;
+	}*/
+
+
+	/////////////////////////////////
+	// プロパティ用のメソッド
+	/////////////////////////////////
+
+	//配列要素を排除
+	GetArrayElement(termFull,VarName,ArrayElements);
+
+	if(GetSubHash(VarName,0)){
+
+		//////////////////////////////////////////////////////
+		/////    レジスタ資源のバックアップ
+		{	BACKUP_REGISTER_RESOURCE
+		//////////////////////////////////////////////////////
+
+			CallPropertyMethod(termFull,NULL,resultType);
+
+			//大きな型への暗黙の変換
+			int bigType = AutoBigCast(baseType.GetBasicType(), resultType.GetBasicType() );
+
+			if( resultType.GetBasicType() != bigType ){
+				// 大きな型へ変換された場合
+				// ※レジスタの値をキャストする
+				ExtendRegToBigType( REG_RAX, bigType, resultType.GetBasicType() );
+
+				resultType.SetBasicType( bigType );
+			}
+
+			SetUseRegFromRax(resultType.GetBasicType(),UseReg,XmmReg);
+
+		/////////////////////////////////////////////
+		//////   レジスタ資源を復元
+			RESTORE_REGISTER_RESOURCE
+		}////////////////////////////////////////////
+
+		if(resultType.IsStruct()){
+			//構造体が戻ったときはヒープ領域にインスタンスが格納されている
+			//※後にfreeする必要あり
+			// TODO: 解放はGCに任せる
+			*pbUseHeap = 1;
+		}
+
+		isLiteral = false;
+
+		return true;
+	}
+
+
+	return false;
+}
+
 bool NumOpe( int *pReg,
 			const char *expression,
@@ -89,6 +503,6 @@
 			BOOL *pbUseHeap ){
 
-	int i,i2,i3,i4;
-	char temporary[1024],temp2[1024],temp3[1024];
+	int i,i2,i3;
+	char temporary[1024],temp2[1024];
 
 	if(expression[0]=='\0'){
@@ -289,4 +703,22 @@
 				term=values[i];
 
+				if( calc[i+1]%100 == CALC_AS ){
+					// As演算子の右辺値
+					//型名
+					if( Type::StringToType( term, resultType ) ){
+						resultType.SetBasicType( resultType.GetBasicType() | FLAG_CAST );
+					}
+					else{
+						SetError(3, term, cp );
+						goto error;
+					}
+
+					type_stack[sp] = resultType.GetBasicType();
+					index_stack[sp] = resultType.GetIndex();
+					sp++;
+
+					break;
+				}
+
 				if(term[0]=='\"'){
 					//リテラル文字列
@@ -298,22 +730,20 @@
 StrLiteral:
 
-					if( baseType.IsObject() ){
-						if( baseType.IsStringObject() ){
-							//要求タイプがStringのとき
-
-							//String型オブジェクトを生成
-							NewStringObject(UseReg,term);
-
-							extern CClass *pobj_StringClass;
-							type_stack[sp]=DEF_OBJECT;
-							index_stack[sp]=(LONG_PTR)pobj_StringClass;
-							bLiteralCalculation=0;
-
-							if(bXmm) pobj_reg->LockXmmReg();
-							else pobj_reg->LockReg();
-
-							sp++;
-							break;
-						}
+					if( baseType.IsObject() || baseType.IsNull() ){
+						//要求タイプがオブジェクト、または未定のとき
+
+						//String型オブジェクトを生成
+						NewStringObject(UseReg,term);
+
+						extern CClass *pobj_StringClass;
+						type_stack[sp]=DEF_OBJECT;
+						index_stack[sp]=(LONG_PTR)pobj_StringClass;
+						bLiteralCalculation=0;
+
+						if(bXmm) pobj_reg->LockXmmReg();
+						else pobj_reg->LockReg();
+
+						sp++;
+						break;
 					}
 
@@ -353,141 +783,56 @@
 					// 何らかの識別子
 
-					//////////////////////////////////////
-					// 関数（DLL、ユーザー定義、組み込み）
-					//////////////////////////////////////
-
-					i2=GetCallProcName(term,temporary);
-					if(term[i2]=='('){
-						i4=GetStringInPare_RemovePare(temp2,term+i2+1);
-
-						void *pInfo;
-						int idProc=GetProc(temporary,(void **)&pInfo);
-
-						Type resultType;
-						if(idProc){
-							//閉じカッコ")"に続く文字がNULLでないとき
-							if(term[i2+1+i4+1]!='\0'){
-								if( term[i2+1+i4+1] == '.'
-									|| term[i2+1+i4+1] == 1 && term[i2+1+i4+2] == ESC_PSMEM ){
-										goto NonProc;
-								}
-								else{
-									SetError(42,NULL,cp);
+					bool isLiteral;
+					if( TermOpe( term, baseType, resultType, isLiteral, &bUseHeap[sp] ) ){
+						if(resultType.IsNull()){
+							//戻り値が存在しないとき
+							for(i2=0;;i2++){
+								if(term[i2]=='('||term[i2]=='\0'){
+									term[i2]=0;
+									break;
 								}
 							}
-
-
-							//////////////////////////////////////////////////////
-							/////    レジスタ資源のバックアップ
-							{	BACKUP_REGISTER_RESOURCE
-							//////////////////////////////////////////////////////
-
-
-								////////////////
-								// 呼び出し
-								////////////////
-
-								CallProc(idProc,pInfo,temporary,temp2,resultType);
-								if(resultType.IsNull()){
-									//戻り値が存在しないとき
-									for(i2=2;;i2++){
-										if(term[i2]=='('||term[i2]=='\0'){
-											term[i2]=0;
-											break;
-										}
-									}
-									SetError(38,term,cp);
-
-									//レジスタ資源を復元
-									RESTORE_REGISTER_RESOURCE
-
-									goto error;
+							SetError(38,term,cp);
+
+							goto error;
+						}
+
+						type_stack[sp] = resultType.GetBasicType();
+						index_stack[sp] = resultType.GetIndex();
+
+						if( !isLiteral ){
+							bLiteralCalculation=0;
+						}
+
+						if( resultType.GetBasicType() & FLAG_CAST ){
+							// 型名のみ
+							SetError();
+						}
+						else{
+							if( resultType.IsReal() == false && UseReg==REG_R14 ){
+								//mov qword ptr[rsp+offset],r14     ※スタックフレームを利用
+								pobj_sf->push(REG_R14);
+							}
+							if( resultType.IsReal() && XmmReg==REG_XMM4 ){
+								if(resultType.IsDouble()){
+									//movsd qword ptr[rsp+offset],xmm4	※スタックフレームを利用
+									pobj_sf->push(REG_XMM4,sizeof(double));
 								}
-
-
-								/////////////////////
-								// 戻り値の処理
-								/////////////////////
-
-								//大きな型への暗黙の変換
-								type_stack[sp]=AutoBigCast(baseType.GetBasicType(),resultType.GetBasicType());
-								index_stack[sp] = resultType.GetIndex();
-								bLiteralCalculation=0;
-
-								if( type_stack[sp] != resultType.GetBasicType() ){
-									// 大きな型へ変換された場合
-									// ※レジスタの値をキャストする
-									ExtendRegToBigType( REG_RAX, type_stack[sp], resultType.GetBasicType() );
+								if(resultType.IsSingle()){
+									//movss dword ptr[rsp+offset],xmm4	※スタックフレームを利用
+									pobj_sf->push(REG_XMM4,sizeof(float));
 								}
-
-								SetUseRegFromRax(resultType.GetBasicType(),UseReg,XmmReg);
-
-								if(resultType.IsReal()) bXmm=1;
-								else bXmm=0;
-
-							/////////////////////////////////////////////
-							//////   レジスタ資源を復元
-								RESTORE_REGISTER_RESOURCE
-							}////////////////////////////////////////////
-
-
-							if(bXmm) pobj_reg->LockXmmReg();
-							else pobj_reg->LockReg();
-
-							if(resultType.IsStruct()){
-								//構造体が戻ったときはヒープ領域にインスタンスが格納されている
-								//※後にfreeする必要あり
-								bUseHeap[sp]=1;
 							}
 
-							sp++;
-							break;
-						}
-						else if(GetConstCalcBuffer(temporary,temp2,temp3)){
-							/////////////////////////
-							// マクロ関数
-							/////////////////////////
-
-							//閉じカッコ")"に続く文字がNULLでないときはエラーにする
-							if(term[i2+1+i4+1]!='\0') SetError(42,NULL,cp);
-
-							//マクロ関数の場合
-							NumOpe(&UseReg,temp3,Type(),resultType);
-
-							if(!IS_LITERAL(resultType.GetIndex())){
-								//リテラル値ではなかったとき
-								bLiteralCalculation=0;
+							if( resultType.IsReal() ){
+								pobj_reg->LockXmmReg();
 							}
-
-							type_stack[sp] = resultType.GetBasicType();
-							index_stack[sp] = resultType.GetIndex();
-
-							if(resultType.IsReal()) pobj_reg->LockXmmReg();
-							else pobj_reg->LockReg();
-
-							sp++;
-							break;
-						}
-					}
-NonProc:
-
-
-					//インデクサ（getアクセサ）
-					char variable[VN_SIZE],array_element[VN_SIZE];
-					GetArrayElement(term,variable,array_element);
-					if(array_element[0]){
-						Type resultType;
-						GetVarType(variable,resultType,0);
-						if( resultType.IsObject() ){
-							CallIndexerGetterProc(UseReg,&resultType.GetClass(),variable,array_element,resultType);
-							type_stack[sp]=resultType.GetBasicType();
-							index_stack[sp]=resultType.GetIndex();
-							bLiteralCalculation=0;
-
-							if(resultType.IsReal()) pobj_reg->LockXmmReg();
-							else pobj_reg->LockReg();
-							sp++;
-							break;
-						}
+							else{
+								pobj_reg->LockReg();
+							}
+						}
+
+						sp++;
+						break;
 					}
 
@@ -516,73 +861,4 @@
 
 						pobj_reg->LockReg();
-						sp++;
-						break;
-					}
-
-
-					RELATIVE_VAR RelativeVar;
-					Type varType;
-					if(GetVarOffset(
-						false,	//エラー表示あり
-						false,	//読み込み専用
-						term,
-						&RelativeVar,varType)){
-						//////////
-						// 変数
-						//////////
-
-						//大きな型への暗黙の変換
-						type_stack[sp]=AutoBigCast(baseType.GetBasicType(),varType.GetBasicType());
-						index_stack[sp] = varType.GetIndex();
-						bLiteralCalculation=0;
-
-						if(varType.GetBasicType()&FLAG_PTR){
-							//配列ポインタ
-							type_stack[sp]=GetPtrType(varType.GetBasicType()^FLAG_PTR);
-
-							SetVarPtrToReg(UseReg,&RelativeVar);
-						}
-						else if(varType.IsReal()){
-							//実数型
-							bXmm=1;
-
-							if( varType.IsDouble() )
-								SetXmmReg_DoubleVariable(&RelativeVar,XmmReg);
-							if( varType.IsSingle() )
-								SetXmmReg_SingleVariable(&RelativeVar,XmmReg);
-						}
-						else if( varType.IsWhole() || varType.IsObject()){
-							//整数型
-							SetReg_WholeVariable(varType.GetBasicType(),&RelativeVar,UseReg);
-						}
-						else if( varType.IsStruct() ){
-							//構造体ポインタをUseRegへ格納（構造体は値型）
-							SetVarPtrToReg(UseReg,&RelativeVar);
-						}
-						else SetError(11,term,cp);
-
-						if( type_stack[sp] != varType.GetBasicType() ){
-							// 大きな型へ変換された場合
-							// ※レジスタの値をキャストする
-							ExtendRegToBigType( UseReg, type_stack[sp], varType.GetBasicType() );
-						}
-
-						if(bXmm==0&&UseReg==REG_R14){
-							//mov qword ptr[rsp+offset],r14     ※スタックフレームを利用
-							pobj_sf->push(REG_R14);
-						}
-						if(bXmm&&XmmReg==REG_XMM4){
-							if(varType.IsDouble()){
-								//movsd qword ptr[rsp+offset],xmm4	※スタックフレームを利用
-								pobj_sf->push(REG_XMM4,sizeof(double));
-							}
-							if(varType.IsSingle()){
-								//movss dword ptr[rsp+offset],xmm4	※スタックフレームを利用
-								pobj_sf->push(REG_XMM4,sizeof(float));
-							}
-						}
-
-						if(bXmm) pobj_reg->LockXmmReg();
-						else pobj_reg->LockReg();
 						sp++;
 						break;
@@ -622,69 +898,4 @@
 						}
 					}
-
-
-					//////////////
-					// 型名の場合
-					//////////////
-					Type tempType;
-					if( Type::StringToType( term, tempType ) ){
-						type_stack[sp] = tempType.GetBasicType() | FLAG_CAST;
-						index_stack[sp] = tempType.GetIndex();
-						sp++;
-						break;
-					}
-
-
-					/////////////////////////////////
-					// プロパティ用のメソッド
-					/////////////////////////////////
-
-					//配列要素を排除
-					char VarName[VN_SIZE],ArrayElements[VN_SIZE];
-					GetArrayElement(term,VarName,ArrayElements);
-
-					if(GetSubHash(VarName,0)){
-
-						//////////////////////////////////////////////////////
-						/////    レジスタ資源のバックアップ
-						{	BACKUP_REGISTER_RESOURCE
-						//////////////////////////////////////////////////////
-
-							Type resultType;
-							CallPropertyMethod(term,NULL,resultType);
-
-							//大きな型への暗黙の変換
-							type_stack[sp]=AutoBigCast(baseType.GetBasicType(),resultType.GetBasicType());
-							index_stack[sp]=resultType.GetIndex();
-							bLiteralCalculation=0;
-
-							if( type_stack[sp] != resultType.GetBasicType() ){
-								// 大きな型へ変換された場合
-								// ※レジスタの値をキャストする
-								ExtendRegToBigType( REG_RAX, type_stack[sp], resultType.GetBasicType() );
-							}
-
-							SetUseRegFromRax(resultType.GetBasicType(),UseReg,XmmReg);
-
-							if(IsRealNumberType(type_stack[sp])) bXmm=1;
-							else bXmm=0;
-
-						/////////////////////////////////////////////
-						//////   レジスタ資源を復元
-							RESTORE_REGISTER_RESOURCE
-						}////////////////////////////////////////////
-
-						if(type_stack[sp]==DEF_STRUCT){
-							//構造体が戻ったときはヒープ領域にインスタンスが格納されている
-							//※後にfreeする必要あり
-							bUseHeap[sp]=1;
-						}
-
-						if(bXmm) pobj_reg->LockXmmReg();
-						else pobj_reg->LockReg();
-						sp++;
-						break;
-					}
-
 
 
@@ -735,4 +946,5 @@
 
 						if(XmmReg==REG_XMM4){
+							SetError();		// TODO: 未実装
 							//push term
 							op_push_value(i32data);
Index: /BasicCompiler64/Opcode.h
===================================================================
--- /BasicCompiler64/Opcode.h	(revision 96)
+++ /BasicCompiler64/Opcode.h	(revision 97)
@@ -315,5 +315,5 @@
 
 //Compile_Var.cpp
-void GetWithName(char *buffer);
+bool _member_offset(bool isErrorEnabled, bool isWriteAccess, const CClass &objClass, const char *member, RELATIVE_VAR *pRelativeVar, Type &resultType, BOOL bPrivateAccess);
 void SetThisPtrToReg(int reg);
 bool GetVarOffset(bool isErrorEnabled,bool isWriteAccess,const char *NameBuffer,RELATIVE_VAR *pRelativeVar,Type &resultType,int *pss = NULL);
Index: /BasicCompiler_Common/BasicCompiler.cpp
===================================================================
--- /BasicCompiler_Common/BasicCompiler.cpp	(revision 96)
+++ /BasicCompiler_Common/BasicCompiler.cpp	(revision 97)
@@ -697,4 +697,5 @@
 			isUnicode = true;
 			typeOfPtrChar = MAKE_PTR_TYPE(DEF_WORD,1);
+			typeOfPtrUChar = MAKE_PTR_TYPE(DEF_WORD,1);
 		}
 
Index: /BasicCompiler_Common/BasicCompiler.h
===================================================================
--- /BasicCompiler_Common/BasicCompiler.h	(revision 96)
+++ /BasicCompiler_Common/BasicCompiler.h	(revision 97)
@@ -81,4 +81,5 @@
 bool isUnicode = false;
 int typeOfPtrChar = MAKE_PTR_TYPE(DEF_SBYTE,1);
+int typeOfPtrUChar = MAKE_PTR_TYPE(DEF_BYTE,1);
 
 char *basbuf;
Index: /BasicCompiler_Common/Class.cpp
===================================================================
--- /BasicCompiler_Common/Class.cpp	(revision 96)
+++ /BasicCompiler_Common/Class.cpp	(revision 97)
@@ -1528,7 +1528,4 @@
 		if( !objClass.IsUsing() ){
 			// 未使用のクラスは無視する
-			if( (string)objClass.name == "CTest"){
-				int test=0;
-			}
 			continue;
 		}
Index: /BasicCompiler_Common/Class.h
===================================================================
--- /BasicCompiler_Common/Class.h	(revision 96)
+++ /BasicCompiler_Common/Class.h	(revision 97)
@@ -210,7 +210,7 @@
 	//メンバの参照方法
 	enum RefType{
+		Non = 0,		// no reference member
 		Dot,			// obj.member
 		Pointer,		// obj->member
-		Non,			// no reference member
 	};
 };
Index: /BasicCompiler_Common/NumOpe_GetType.cpp
===================================================================
--- /BasicCompiler_Common/NumOpe_GetType.cpp	(revision 96)
+++ /BasicCompiler_Common/NumOpe_GetType.cpp	(revision 97)
@@ -294,8 +294,226 @@
 }
 
+bool GetTermType( const char *term, Type &resultType, bool &isLiteral, bool *pIsClassName = NULL ){
+	char parameter[VN_SIZE];
+
+	// Withを解決
+	char termFull[VN_SIZE];
+	if(term[0]=='.'){
+		GetWithName(termFull);
+		lstrcat(termFull,term);
+	}
+	else lstrcpy(termFull,term);
+
+	char termLeft[VN_SIZE];
+	lstrcpy(termLeft,termFull);
+
+	// パース
+	char member[VN_SIZE];
+	CClass::RefType refType;
+	if( SplitMemberName( termFull, termLeft, member, refType ) ){
+		///////////////////////////////////////////////////////////////////
+		// オブジェクトとメンバに分解できるとき
+		// termLeft.member
+		///////////////////////////////////////////////////////////////////
+
+		isLiteral = false;
+
+		// オブジェクト側の型を取得
+		bool isClassName = false;
+		Type leftType;
+		if( !GetTermType( termLeft, leftType, isLiteral, &isClassName ) ){
+			return false;
+		}
+
+		if( isClassName ){
+			// 静的メンバ/メソッドの場合
+			goto globalArea;
+		}
+
+		if( !leftType.HasMember() ){
+			// メンバを持たない型の場合
+			return false;
+		}
+
+		const CClass &objClass = leftType.GetClass();
+
+
+		///////////////////////////////////////////////////////////////////
+		// メンバを検索
+		///////////////////////////////////////////////////////////////////
+		if( GetMemberType( objClass, member, resultType, 0, false ) ){
+			// メンバが見つかったとき
+			return true;
+		}
+
+
+		///////////////////////////////////////////////////////////////////
+		// 動的メソッドを検索
+		///////////////////////////////////////////////////////////////////
+		vector<UserProc *> userProcs;
+
+		char methodName[VN_SIZE] ,lpPtrOffset[VN_SIZE];
+		lstrcpy( methodName, member );
+		GetVarFormatString(methodName,parameter,lpPtrOffset,member,refType);
+
+		objClass.EnumMethod( methodName, userProcs );
+		UserProc *pUserProc;
+		if(userProcs.size()){
+			//オーバーロードを解決
+			pUserProc=OverloadSolutionWithStrParam(termFull,userProcs,parameter,termLeft);
+
+			if( pUserProc ){
+				resultType = pUserProc->ReturnType();
+				return true;
+			}
+		}
+
+		return false;
+	}
+
+
+	//////////////////////////////////////////////
+	// クラス名かどうかをチェック（静的メンバ用）
+	//////////////////////////////////////////////
+
+	if( pIsClassName ){
+		if( pobj_DBClass->check( termFull ) ){
+			*pIsClassName = true;
+			return true;
+		}
+	}
+
+
+	/////////////////////////////////////////////////////////////////
+	// グローバル属性
+	/////////////////////////////////////////////////////////////////
+globalArea:
+
+
+	if(lstrcmpi(termFull,"This")==0){
+		//Thisオブジェクト
+		resultType.SetType( DEF_OBJECT, pobj_CompilingClass );
+		return true;
+	}
+
+
+	//////////////////////////////////////
+	// 関数（DLL、ユーザー定義、組み込み）
+	//////////////////////////////////////
+	char procName[VN_SIZE];
+	char temporary[8192];
+
+	int i2=GetCallProcName(termFull,procName);
+	if(termFull[i2]=='('){
+		int i4=GetStringInPare_RemovePare(parameter,termFull+i2+1);
+
+		void *pProc;
+		int idProc=GetProc(procName,(void **)&pProc);
+
+		if(idProc){
+			//閉じカッコ")"に続く文字がNULLでないとき
+			if(termFull[i2+1+i4+1]!='\0'){
+				SetError(42,NULL,cp);
+			}
+
+
+			////////////////
+			// 呼び出し
+			////////////////
+
+			if( !CallProc(idProc,pProc,procName,parameter, resultType, false ) ){
+				return false;
+			}
+			if( resultType.IsNull() ){
+				//戻り値が存在しないとき
+				return false;
+			}
+
+			isLiteral = false;
+
+			return true;
+		}
+		else if(GetConstCalcBuffer(procName,parameter,temporary)){
+			/////////////////////////
+			// マクロ関数
+			/////////////////////////
+
+			//閉じカッコ")"に続く文字がNULLでないときはエラーにする
+			if(termFull[i2+1+i4+1]!='\0') SetError(42,NULL,cp);
+
+			//マクロ関数の場合
+			if( !NumOpe_GetType(temporary,Type(),resultType) ){
+				return false;
+			}
+
+			if( !IS_LITERAL( resultType.GetIndex() ) ){
+				//リテラル値ではなかったとき
+				isLiteral = false;
+			}
+
+			return true;
+		}
+	}
+
+
+	////////////////////////////////
+	// インデクサ（getアクセサ）
+	////////////////////////////////
+
+	char VarName[VN_SIZE],ArrayElements[VN_SIZE];
+	GetArrayElement(termFull,VarName,ArrayElements);
+	if(ArrayElements[0]){
+		GetVarType(VarName,resultType,false);
+		if( resultType.IsObject() ){
+			if( !GetReturnTypeOfIndexerGetterProc( resultType.GetClass(),resultType) ){
+				SetError(1,NULL,cp);
+				return false;
+			}
+
+			isLiteral = false;
+
+			return true;
+		}
+	}
+
+
+	////////////////////////////////
+	// 変数
+	////////////////////////////////
+
+	if( GetVarType( termFull, resultType, false ) ){
+		if( resultType.GetBasicType() & FLAG_PTR ){
+			//配列ポインタ
+			resultType.SetBasicType( GetPtrType( resultType.GetBasicType()^FLAG_PTR ) );
+		}
+
+		isLiteral = false;
+
+		return true;
+	}
+
+
+	/////////////////////////////////
+	// プロパティ用のメソッド
+	/////////////////////////////////
+
+	//配列要素を排除
+	GetArrayElement(termFull,VarName,ArrayElements);
+
+	if(GetSubHash(VarName,0)){
+		GetReturnTypeOfPropertyMethod(termFull,NULL,resultType);
+
+		isLiteral = false;
+
+		return true;
+	}
+
+
+	return false;
+}
+
 bool NumOpe_GetType( const char *expression, const Type &baseType, Type &resultType ){
 	extern int cp;
-	int i,i2,i3,i4;
-	char temporary[1024],temp2[1024],temp3[1024];
+	int i,i3;
 
 	if(expression[0]=='\0'){
@@ -392,9 +610,27 @@
 				term = values[i];
 
+				if( calc[i+1]%100 == CALC_AS ){
+					// As演算子の右辺値
+					//型名
+					if( Type::StringToType( term, resultType ) ){
+						resultType.SetBasicType( resultType.GetBasicType() | FLAG_CAST );
+					}
+					else{
+						SetError(3, term, cp );
+						goto error;
+					}
+
+					type_stack[sp] = resultType.GetBasicType();
+					index_stack[sp] = resultType.GetIndex();
+					sp++;
+
+					break;
+				}
+
 				if(term[0]=='\"'){
 StrLiteral:
 
-					if( baseType.IsStringObject() ){
-						//要求タイプがオブジェクトであり、Stringの受け入れが可能な場合
+					if( baseType.IsObject() || baseType.IsNull() ){
+						//要求タイプがオブジェクト、または未定のとき
 						extern CClass *pobj_StringClass;
 						type_stack[sp]=DEF_OBJECT;
@@ -421,94 +657,15 @@
 					// 何らかの識別子
 
-					//////////////////////////////////////
-					// 関数（DLL、ユーザー定義、組み込み）
-					//////////////////////////////////////
-
-					i2=GetCallProcName(term,temporary);
-					if(term[i2]=='('){
-						i4=GetStringInPare_RemovePare(temp2,term+i2+1);
-
-						int idProc;
-						void *pProc;
-						idProc=GetProc(temporary,(void **)&pProc);
-
-						if(idProc){
-							//閉じカッコ")"に続く文字がNULLでないとき
-							if(term[i2+1+i4+1]!='\0'){
-								if( term[i2+1+i4+1] == '.'
-									|| term[i2+1+i4+1] == 1 && term[i2+1+i4+2] == ESC_PSMEM ){
-										goto NonProc;
-								}
-								else{
-									SetError(42,NULL,cp);
-								}
-							}
-
-
-							////////////////
-							// 呼び出し
-							////////////////
-
-							Type resultType;
-							if( !CallProc(idProc,pProc,temporary,temp2, resultType, false ) ){
-								goto error;
-							}
-							if( resultType.IsNull() ){
-								//戻り値が存在しないとき
-								goto error;
-							}
-
-							type_stack[sp] = resultType.GetBasicType();
-							index_stack[sp] = resultType.GetIndex();
-
+					bool isLiteral = true;
+					if( GetTermType( term, resultType, isLiteral ) ){
+						type_stack[sp] = resultType.GetBasicType();
+						index_stack[sp] = resultType.GetIndex();
+
+						if( !isLiteral ){
 							bLiteralCalculation=0;
-
-							sp++;
-							break;
 						}
-						else if(GetConstCalcBuffer(temporary,temp2,temp3)){
-							/////////////////////////
-							// マクロ関数
-							/////////////////////////
-
-							//閉じカッコ")"に続く文字がNULLでないときはエラーにする
-							if(term[i2+1+i4+1]!='\0') SetError(42,NULL,cp);
-
-							//マクロ関数の場合
-							Type tempType;
-							NumOpe_GetType(temp3,Type(),tempType);
-
-							if(!IS_LITERAL(tempType.GetIndex())){
-								//リテラル値ではなかったとき
-								bLiteralCalculation=0;
-							}
-
-							type_stack[sp] = tempType.GetBasicType();
-							index_stack[sp] = tempType.GetIndex(); 
-
-							sp++;
-							break;
-						}
-					}
-NonProc:
-
-					//インデクサ（getアクセサ）
-					char VarName[VN_SIZE],ArrayElements[VN_SIZE];
-					GetArrayElement(term,VarName,ArrayElements);
-					if(ArrayElements[0]){
-						Type type;
-						GetVarType(VarName,type,false);
-						if( type.IsObject() ){
-							if( !GetReturnTypeOfIndexerGetterProc( type.GetClass(),type) ){
-								SetError(1,NULL,cp);
-								goto error;
-							}
-							type_stack[sp]=type.GetBasicType();
-							index_stack[sp]=type.GetIndex();
-							bLiteralCalculation=0;
-
-							sp++;
-							break;
-						}
+
+						sp++;
+						break;
 					}
 
@@ -526,29 +683,4 @@
 						}
 						bLiteralCalculation = 0;
-						sp++;
-						break;
-					}
-
-					if( (string)term == "s.GetType().Name" ){
-						int test=0;
-					}
-
-
-					Type varType;
-					if( GetVarType(term,varType,0) ){
-						//////////
-						// 変数
-						//////////
-
-						if( varType.GetBasicType() & FLAG_PTR ){
-							//配列ポインタ
-							type_stack[sp]=GetPtrType( varType.GetBasicType()^FLAG_PTR );
-						}
-						else{
-							type_stack[sp]=varType.GetBasicType();
-						}
-						index_stack[sp] = varType.GetIndex();
-
-						bLiteralCalculation=0;
 						sp++;
 						break;
@@ -586,17 +718,4 @@
 
 
-					//////////////
-					// 型名の場合
-					//////////////
-
-					Type tempType;
-					if( Type::StringToType( term, tempType ) ){
-						type_stack[sp] = tempType.GetBasicType() | FLAG_CAST;
-						index_stack[sp] = tempType.GetIndex();
-						sp++;
-						break;
-					}
-
-
 					/////////////////////////////////
 					// プロパティ用のメソッド
@@ -604,7 +723,9 @@
 
 					//配列要素を排除
+					char VarName[VN_SIZE],ArrayElements[VN_SIZE];
 					GetArrayElement(term,VarName,ArrayElements);
 
 					if(GetSubHash(VarName,0)){
+						SetError();
 						Type tempType;
 						GetReturnTypeOfPropertyMethod(term,NULL,tempType);
Index: /BasicCompiler_Common/OldStatement.cpp
===================================================================
--- /BasicCompiler_Common/OldStatement.cpp	(revision 96)
+++ /BasicCompiler_Common/OldStatement.cpp	(revision 97)
@@ -103,5 +103,5 @@
 		else if(varType.IsObject()){
 			varType.SetBasicType( DEF_OBJECT );
-			if( varType.IsStringObject() ){
+			if( varType.IsStringClass() ){
 				varType.SetBasicType( DEF_STRING );
 			}
Index: /BasicCompiler_Common/Procedure.h
===================================================================
--- /BasicCompiler_Common/Procedure.h	(revision 96)
+++ /BasicCompiler_Common/Procedure.h	(revision 97)
@@ -85,4 +85,8 @@
 class UserProc : public Procedure
 {
+#ifdef _DEBUG
+public:
+	string _paramStr;
+#endif
 
 private:
Index: /BasicCompiler_Common/Subroutine.cpp
===================================================================
--- /BasicCompiler_Common/Subroutine.cpp	(revision 96)
+++ /BasicCompiler_Common/Subroutine.cpp	(revision 97)
@@ -83,24 +83,42 @@
 	}
 }
+bool SplitMemberName( const char *desc, char *object, char *member, CClass::RefType &refType ){
+	int lastIndex = -1;
+	for( int i=0; desc[i]; i++ ){
+		if( desc[i] == '(' ){
+			i=JumpStringInPare(desc,i+1);
+			continue;
+		}
+		else if( desc[i] == '[' ){
+			i=JumpStringInBracket(desc,i+1);
+			continue;
+		}
+		else if(desc[i]=='.'||(desc[i]==1&&desc[i+1]==ESC_PSMEM)){
+			lastIndex = i;
+		}
+	}
+	if( lastIndex == -1 ){
+		return false;
+	}
+
+	if(desc[lastIndex]=='.'){
+		lstrcpy(member,desc+lastIndex+1);
+		refType = CClass::Dot;
+	}
+	else{
+		lstrcpy(member,desc+lastIndex+2);
+		refType = CClass::Pointer;
+	}
+
+	if( object ){
+		lstrcpy( object, desc );
+		object[lastIndex]=0;
+	}
+
+	return true;
+}
 bool SplitMemberName( const char *desc, char *object, char *member ){
-	int i;
-	for(i=lstrlen(desc)-1;i>=0;i--){
-		if(desc[i]=='.'||(desc[i]==1&&desc[i+1]==ESC_PSMEM))
-			break;
-	}
-	if(i==-1) return false;
-	else{
-		if(desc[i]=='.')
-			lstrcpy(member,desc+i+1);
-		else
-			lstrcpy(member,desc+i+2);
-
-		if( object ){
-			lstrcpy( object, desc );
-			object[i]=0;
-		}
-	}
-
-	return true;
+	CClass::RefType dummyRefType;
+	return SplitMemberName( desc, object, member, dummyRefType );
 }
 
@@ -565,5 +583,4 @@
 	SubNum++;
 
-
 	UserProc *pUserProc = new UserProc( temporary, kind, isMacro, isCdecl, isExport );
 	pUserProc->SetParentClass( pobj_c );
@@ -580,4 +597,8 @@
 	// ※第1パラメータにに指定するデータの例："( s As String ) As String"
 	pUserProc->SetParamsAndReturnType( buffer + i, nowLine, isStatic );
+
+#ifdef _DEBUG
+	pUserProc->_paramStr = buffer + i;
+#endif
 
 
Index: /BasicCompiler_Common/Type.cpp
===================================================================
--- /BasicCompiler_Common/Type.cpp	(revision 96)
+++ /BasicCompiler_Common/Type.cpp	(revision 97)
@@ -417,5 +417,14 @@
 	return false;
 }
-bool Type::IsStringObject() const
+bool Type::IsObjectClass() const
+{
+	if( basicType == DEF_OBJECT ){
+		if( lstrcmp( pClass->name,"Object")==0){
+			return true;
+		}
+	}
+	return false;
+}
+bool Type::IsStringClass() const
 {
 	if( basicType == DEF_OBJECT ){
@@ -438,4 +447,13 @@
 	if( basicType == DEF_ANY ){
 		return true;
+	}
+	return false;
+}
+
+bool Type::HasMember() const
+{
+	if( NATURAL_TYPE( basicType ) == DEF_OBJECT
+		|| NATURAL_TYPE( basicType ) == DEF_STRUCT ){
+			return true;
 	}
 	return false;
Index: /BasicCompiler_Common/Type.h
===================================================================
--- /BasicCompiler_Common/Type.h	(revision 96)
+++ /BasicCompiler_Common/Type.h	(revision 97)
@@ -105,7 +105,11 @@
 	bool IsObject() const;
 	bool IsObjectPtr() const;
-	bool IsStringObject() const;
+	bool IsObjectClass() const;
+	bool IsStringClass() const;
 	bool IsVoidPtr() const;
 	bool IsAny() const;
+
+	// オブジェクトや構造体など、メンバを持つ型かどうかを判別する
+	bool HasMember() const;
 
 	const string ToString() const;
Index: /BasicCompiler_Common/VariableOpe.cpp
===================================================================
--- /BasicCompiler_Common/VariableOpe.cpp	(revision 96)
+++ /BasicCompiler_Common/VariableOpe.cpp	(revision 97)
@@ -240,4 +240,13 @@
 }
 
+void GetWithName(char *buffer){
+	extern WITHINFO WithInfo;
+	int i;
+
+	buffer[0]=0;
+	for(i=0;i<WithInfo.num;i++)
+		lstrcat(buffer,WithInfo.ppName[i]);
+}
+
 bool FormatUseProcReturnObject( const char *term, char *procName, char *parameter, CClass::RefType &refType, char *member ){
 	int p1 = 0, p2 = 0;
@@ -1173,5 +1182,4 @@
 	}
 
-
 	//構文を解析
 	int SubScripts[MAX_ARRAYDIM];
Index: /BasicCompiler_Common/VariableOpe.h
===================================================================
--- /BasicCompiler_Common/VariableOpe.h	(revision 96)
+++ /BasicCompiler_Common/VariableOpe.h	(revision 97)
@@ -14,4 +14,5 @@
 int GetPtrType(int type);
 BOOL GetTypeName(int type,LONG_PTR lpIndex,char *name);
+void GetWithName(char *buffer);
 bool FormatUseProcReturnObject( const char *term, char *procName, char *parameter, CClass::RefType &refType, char *member );
 BOOL GetVarFormatString(char *buffer,char *array,char *array2,char *NestMember, CClass::RefType &refType );
@@ -21,4 +22,5 @@
 void GetArrange(char *variable,char *variAnswer,int *SubScripts);
 int GetTypeFromSimpleName(char *variable);
+bool GetMemberType( const CClass &objClass, const char *lpszMember, Type &resultType, BOOL bPrivateAccess, bool isErrorEnabled);
 bool GetVarType( const char *nameBuffer, Type &resultType, bool isError);
 bool GetVarOffsetReadOnly(const char *NameBuffer,RELATIVE_VAR *pRelativeVar,Type &resultType,int *pss = NULL );
Index: /BasicCompiler_Common/calculation.cpp
===================================================================
--- /BasicCompiler_Common/calculation.cpp	(revision 96)
+++ /BasicCompiler_Common/calculation.cpp	(revision 97)
@@ -820,6 +820,8 @@
 	for(i=0,sp=0;i<pnum;i++){
 
-		//型チェック（正常でない場合はエラーにする）
-		TypeErrorCheck(stack,sp,calc[i]%100);
+		if( enableerror ){
+			//型チェック（正常でない場合はエラーにする）
+			TypeErrorCheck(stack,sp,calc[i]%100);
+		}
 
 		idCalc=calc[i]%100;
@@ -1088,5 +1090,5 @@
 #pragma optimize("", on)
 
-BOOL GetConstCalcBuffer(char *name,char *Parameter,char *pCalcBuffer){
+BOOL GetConstCalcBuffer(const char *name,const char *Parameter,char *pCalcBuffer){
 	extern HANDLE hHeap;
 	int i2,i3,i4,num;
@@ -1256,5 +1258,5 @@
 					pDllProc=GetDeclareHash(temporary);
 					if(pDllProc){
-						if( pDllProc->ReturnType().IsStringObject() ){
+						if( pDllProc->ReturnType().IsStringClass() ){
 							return 1;
 						}
@@ -1266,5 +1268,5 @@
 					pUserProc=GetSubHash(temporary);
 					if(pUserProc){
-						if( pUserProc->ReturnType().IsStringObject() ){
+						if( pUserProc->ReturnType().IsStringClass() ){
 							return 1;
 						}
@@ -1307,5 +1309,5 @@
 					return -1;
 				}
-				if( varType.IsStringObject() ){
+				if( varType.IsStringClass() ){
 					return 1;
 				}
@@ -1526,4 +1528,6 @@
 	}
 
+	calc[*pnum]=0;
+
 	return 1;
 }
Index: /BasicCompiler_Common/common.h
===================================================================
--- /BasicCompiler_Common/common.h	(revision 96)
+++ /BasicCompiler_Common/common.h	(revision 97)
@@ -94,4 +94,5 @@
 extern bool isUnicode;
 extern int typeOfPtrChar;
+extern int typeOfPtrUChar;
 
 
@@ -294,5 +295,5 @@
 //hash.cpp
 int hash_default(const char *name);
-CONSTINFO *GetConstHash(char *name);
+CONSTINFO *GetConstHash(const char *name);
 DllProc *GetDeclareHash(char *name);
 void GetOverloadSubHash( const char *lpszName, std::vector<UserProc *> &subs );
@@ -418,5 +419,5 @@
 int NeutralizationType(int type1,LONG_PTR index1,int type2,LONG_PTR index2);
 DWORD GetLiteralValue(char *value,_int64 *pi64,int BaseType);
-BOOL GetConstCalcBuffer(char *name,char *Parameter,char *pCalcBuffer);
+BOOL GetConstCalcBuffer(const char *name,const char *Parameter,char *pCalcBuffer);
 DWORD GetConstValue(char *name,double *dbl,char *buffer,LONG_PTR *plpIndex);
 bool IsStringObjectType(const Type &TypeInfo);
@@ -435,4 +436,5 @@
 int GetProc(char *name,void **ppInfo);
 void SplitObjectName(const char *name,char *ObjectName,int *pRefType);
+bool SplitMemberName( const char *desc, char *object, char *member, CClass::RefType &refType );
 bool SplitMemberName( const char *desc, char *object, char *member );
 bool CallProc( int kind, const void *pProc, const char *fullCallName, const char *lpszParms, Type &resultType, bool isCallOn = true );
Index: /BasicCompiler_Common/hash.cpp
===================================================================
--- /BasicCompiler_Common/hash.cpp	(revision 96)
+++ /BasicCompiler_Common/hash.cpp	(revision 97)
@@ -17,5 +17,5 @@
 }
 
-CONSTINFO *GetConstHash(char *name){
+CONSTINFO *GetConstHash(const char *name){
 	//ハッシュ値を取得
 	int key;
