Index: trunk/jenga/src/smoothie/Procedure.cpp
===================================================================
--- trunk/jenga/src/smoothie/Procedure.cpp	(revision 173)
+++ trunk/jenga/src/smoothie/Procedure.cpp	(revision 181)
@@ -10,367 +10,4 @@
 	return GetName();
 }
-/*
-bool UserProc::SetParamsAndReturnType( const char *sourceOfParams, int nowLine, bool isStatic ){
-	int i = 0;
-	int i2,i3,sw;
-	char temporary[8192],temp2[VN_SIZE];
-
-	//ソースコードの位置
-	this->codePos = nowLine;
-
-	//パラメータ
-	if(sourceOfParams[i]!='('){
-		throw SmoothieException(1,NULL,nowLine);
-		return 0;
-	}
-	i++;
-	if(sourceOfParams[i]!=')'&& this->pParentClass ){
-		//クラスのメンバ関数の場合のみ、デストラクタにパラメータがある場合にエラーをだす
-		if(this->GetName()[0]=='~'){
-			throw SmoothieException(114,NULL,nowLine);
-			i=JumpStringInPare(sourceOfParams,i);
-		}
-	}
-	while(1){
-		if(sourceOfParams[i]==')') break;
-
-		//ByRef
-		bool isRef;
-		if(sourceOfParams[i]==1&&sourceOfParams[i+1]==ESC_BYVAL){
-			isRef = false;
-			i+=2;
-		}
-		else if(sourceOfParams[i]==1&&sourceOfParams[i+1]==ESC_BYREF){
-			isRef = true;
-			i+=2;
-		}
-		else isRef = false;
-
-		//パラメータ名
-		bool isArray = false;
-		int subScripts[MAX_ARRAYDIM];
-		char name[VN_SIZE];
-		sw=0;
-		for(i2=0;;i++,i2++){
-			if(sourceOfParams[i]=='('){
-				if(!sw) sw=1;
-
-				i3=GetStringInPare(name+i2,sourceOfParams+i);
-				i2+=i3-1;
-				i+=i3-1;
-				continue;
-			}
-			if(sourceOfParams[i]=='['){
-				if(!sw) sw=1;
-
-				i3=GetStringInBracket(name+i2,sourceOfParams+i);
-				i2+=i3-1;
-				i+=i3-1;
-				continue;
-			}
-			if(!IsVariableChar(sourceOfParams[i])){
-				name[i2]=0;
-				break;
-			}
-			name[i2]=sourceOfParams[i];
-		}
-		if(sw){
-			//配列パラメータ
-			if( isRef == false ) throw SmoothieException(29,NULL,nowLine);
-			isArray = true;
-
-			if((name[i2-2]=='('&&name[i2-1]==')')||
-				(name[i2-2]=='['&&name[i2-1]==']')){
-				subScripts[0]=LONG_MAX;
-				subScripts[1]=-1;
-
-				name[i2-2]=0;
-			}
-			else{
-				GetArrange(name,temp2,subScripts);
-				lstrcpy(name,temp2);
-			}
-
-			i2=lstrlen(name);
-		}
-
-		Type type( DEF_NON );
-		char initValue[8192] = "";
-		if( sourceOfParams[i] == '=' ){
-			i++;
-			i = GetOneParameter( sourceOfParams, i, initValue );
-
-			//エラー用
-			cp = nowLine;
-
-			NumOpe_GetType( initValue, Type::String(), type );
-		}
-		else if(sourceOfParams[i]==1&&sourceOfParams[i+1]==ESC_AS){
-			// As指定
-			i+=2;
-
-			i2=0;
-			while(sourceOfParams[i]=='*'){
-				temporary[i2]=sourceOfParams[i];
-				i++;
-				i2++;
-			}
-			for(;;i++,i2++){
-				if(!IsVariableChar(sourceOfParams[i])){
-					if(sourceOfParams[i]==1&&(sourceOfParams[i+1]==ESC_FUNCTION||sourceOfParams[i+1]==ESC_SUB)){
-						temporary[i2++]=sourceOfParams[i++];
-						temporary[i2]=sourceOfParams[i];
-						continue;
-					}
-					temporary[i2]=0;
-					break;
-				}
-				temporary[i2]=sourceOfParams[i];
-			}
-
-			Type::StringToType( temporary, type );
-
-			if( type.IsNull() ){
-				throw SmoothieException(3,temporary,nowLine);
-				type.SetBasicType( DEF_PTR_VOID );
-			}
-
-			if( type.IsObject() ){
-				if( type.GetClass().IsBlittableType() ){
-					// Blittable型のときは基本型として扱う
-					type = type.GetClass().GetBlittableType();
-				}
-			}
-		}
-		else{
-			type.SetBasicType( Type::GetBasicTypeFromSimpleName(temporary) );
-			throw SmoothieException(-103,temporary,nowLine);
-		}
-
-		Parameter *pParam = new Parameter( name, type, isRef, initValue );
-		if( isArray ){
-			pParam->SetArray( subScripts );
-		}
-
-		//パラメータを追加
-		this->params.push_back( pParam );
-
-		if(sourceOfParams[i]==','){
-			i++;
-			continue;
-		}
-		else if(sourceOfParams[i]==')') continue;
-		else{
-			throw SmoothieException(1,NULL,nowLine);
-			break;
-		}
-	}
-	this->secondParmNum = (int)this->params.size();
-	i++;
-	if(sourceOfParams[i]=='('){
-		i++;
-		while(1){
-			if(sourceOfParams[i]==')') break;
-
-			//ByRef
-			bool isRef;
-			if(sourceOfParams[i]==1&&sourceOfParams[i+1]==ESC_BYVAL){
-				isRef = false;
-				i+=2;
-			}
-			else if(sourceOfParams[i]==1&&sourceOfParams[i+1]==ESC_BYREF){
-				isRef = true;
-				i+=2;
-			}
-			else isRef = false;
-
-			//パラメータ名
-			bool isArray = false;
-			int subScripts[MAX_ARRAYDIM];
-			char name[VN_SIZE];
-			sw=0;
-			for(i2=0;;i++,i2++){
-				if(sourceOfParams[i]=='('){
-					if(!sw) sw=1;
-
-					i3=GetStringInPare(name+i2,sourceOfParams+i);
-					i2+=i3-1;
-					i+=i3-1;
-					continue;
-				}
-				if(sourceOfParams[i]=='['){
-					if(!sw) sw=1;
-
-					i3=GetStringInBracket(name+i2,sourceOfParams+i);
-					i2+=i3-1;
-					i+=i3-1;
-					continue;
-				}
-				if(!IsVariableChar(sourceOfParams[i])){
-					name[i2]=0;
-					break;
-				}
-				name[i2]=sourceOfParams[i];
-			}
-			if(sw){
-				//配列パラメータ
-				if( isRef == false ) throw SmoothieException(29,NULL,nowLine);
-				isArray = true;
-
-				if((name[i2-2]=='('&&name[i2-1]==')')||
-					(name[i2-2]=='['&&name[i2-1]==']')){
-					subScripts[0]=LONG_MAX;
-					subScripts[1]=-1;
-
-					name[i2-2]=0;
-				}
-				else{
-					GetArrange(name,temp2,subScripts);
-					lstrcpy(name,temp2);
-				}
-
-				i2=lstrlen(name);
-			}
-
-			//型
-			Type type( DEF_NON );
-			if(sourceOfParams[i]==1&&sourceOfParams[i+1]==ESC_AS){
-				i+=2;
-
-				i2=0;
-				while(sourceOfParams[i]=='*'){
-					temporary[i2]=sourceOfParams[i];
-					i++;
-					i2++;
-				}
-				for(;;i++,i2++){
-					if(!IsVariableChar(sourceOfParams[i])){
-						if(sourceOfParams[i]==1&&(sourceOfParams[i+1]==ESC_FUNCTION||sourceOfParams[i+1]==ESC_SUB)){
-							temporary[i2++]=sourceOfParams[i++];
-							temporary[i2]=sourceOfParams[i];
-							continue;
-						}
-						temporary[i2]=0;
-						break;
-					}
-					temporary[i2]=sourceOfParams[i];
-				}
-
-				Type::StringToType( temporary, type );
-
-				if( type.IsNull() ){
-					throw SmoothieException(3,temporary,nowLine);
-					type.SetBasicType( DEF_PTR_VOID );
-				}
-			}
-			else{
-				type.SetBasicType( Type::GetBasicTypeFromSimpleName(temporary) );
-				throw SmoothieException(-103,temporary,nowLine);
-			}
-
-			Parameter *pParam = new Parameter( name, type, isRef );
-			if( isArray ){
-				pParam->SetArray( subScripts );
-			}
-
-			//パラメータを追加
-			this->params.push_back( pParam );
-
-			if(sourceOfParams[i]==','){
-				i++;
-				continue;
-			}
-			else if(sourceOfParams[i]==')') continue;
-			else{
-				throw SmoothieException(1,NULL,nowLine);
-				break;
-			}
-		}
-		i++;
-	}
-
-	if(sourceOfParams[i]){
-		///////////////////
-		// 戻り値を取得
-		///////////////////
-
-		if( !this->IsFunction() ){
-			// Sub/Macroの場合
-			throw SmoothieException(38,this->GetName(),nowLine);
-		}
-
-		if( this->pParentClass ){
-			if( this->GetName() == this->pParentClass->GetName() ||
-				this->GetName()[0]=='~'){
-				//クラスのコンストラクタ、デストラクタがFunction定義の場合はエラーをだす
-				throw SmoothieException(115,NULL,nowLine);
-			}
-		}
-
-
-		i2=lstrlen(sourceOfParams)-2;
-
-		int sw_as=0;
-		for(;i2>0;i2--){
-			if(sourceOfParams[i2]==')') break;
-
-			if(sourceOfParams[i2]==1&&sourceOfParams[i2+1]==ESC_AS){
-				i2+=2;
-				i3=0;
-				while(sourceOfParams[i2]=='*') temporary[i3++]=sourceOfParams[i2++];
-				for(;;i2++,i3++){
-					if(!IsVariableChar(sourceOfParams[i2])){
-						temporary[i3]=0;
-						break;
-					}
-					temporary[i3]=sourceOfParams[i2];
-				}
-				Type::StringToType( temporary, this->returnType );
-				if( this->returnType.IsNull() ) throw SmoothieException(3,temporary,nowLine);
-
-				sw_as=1;
-				break;
-			}
-		}
-
-		if(!sw_as){
-			throw SmoothieException(-104,this->GetName().c_str(),nowLine);
-
-			this->returnType.SetBasicType( DEF_DOUBLE );
-		}
-	}
-	else{
-		//戻り値なしのSub定義
-		this->returnType.SetNull();
-	}
-
-	//リアルパラメータ領域を取得（_System_LocalThisを考慮して2つだけ多く確保する場合がある）
-
-	if( this->pParentClass && isStatic == false ){
-		//オブジェクトメンバの場合は、第一パラメータを_System_LocalThis引き渡し用として利用
-		string name = "_System_LocalThis";
-		Type type( DEF_PTR_VOID );
-		this->realParams.push_back( new Parameter( name, type ) );
-	}
-
-	if( this->returnType.IsStruct() ){
-		//構造体を戻り値として持つ場合
-		//※第一パラメータ（Thisポインタありの場合は第二パラメータ）を戻り値用の参照宣言にする
-
-		string name = this->GetName();
-		if(name[0]==1&&name[1]==ESC_OPERATOR){
-			name="_System_ReturnValue";
-		}
-		Type type( DEF_STRUCT, this->returnType.GetIndex() );
-		this->realParams.push_back( new Parameter( name, type, true ) );
-	}
-
-	//パラメータをコピー
-	foreach( Parameter *pParam, params ){
-		this->realParams.push_back( new Parameter( *pParam ) );
-	}
-
-	return true;
-}*/
 bool UserProc::IsVirtual() const
 {
@@ -398,160 +35,4 @@
 	throw SmoothieException();
 	return false;
-}
-
-/*
-GlobalProc *GlobalProc::Create( const NamespaceScopes &namespaceScopes, char *buffer,int nowLine ){
-	int i2;
-	char temporary[8192];
-
-	int i=1;
-
-	Procedure::Kind kind = Procedure::Sub;
-	bool isMacro = false;
-	if(buffer[i]==ESC_FUNCTION) kind = Procedure::Function;
-	if(buffer[i]==ESC_MACRO){
-		isMacro = true;
-	}
-
-	i++;
-
-	bool isCdecl = false;
-	bool isExport = false;
-	while(1){
-		if(buffer[i]==1&&buffer[i+1]==ESC_CDECL&& isCdecl == false ){
-			isCdecl = true;
-
-			i+=2;
-		}
-		else if(buffer[i]==1&&buffer[i+1]==ESC_EXPORT&& isExport == false ){
-			isExport = true;
-
-			i+=2;
-		}
-		else break;
-	}
-
-	i2=0;
-	if(buffer[i]==1&&buffer[i+1]==ESC_OPERATOR){
-		throw SmoothieException(126,NULL,nowLine);
-		return 0;
-	}
-	else{
-		for(;;i++,i2++){
-			if(!IsVariableChar(buffer[i])){
-				temporary[i2]=0;
-				break;
-			}
-			temporary[i2]=buffer[i];
-		}
-	}
-
-	if( isMacro ){
-		//大文字に変換
-		CharUpper(temporary);
-
-		//マクロ関数の場合は名前リストに追加
-		extern char **ppMacroNames;
-		extern int MacroNum;
-		ppMacroNames=(char **)HeapReAlloc(hHeap,0,ppMacroNames,(MacroNum+1)*sizeof(char *));
-		ppMacroNames[MacroNum]=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1);
-		lstrcpy(ppMacroNames[MacroNum],temporary);
-		MacroNum++;
-	}
-
-	//重複チェック
-	if(GetDeclareHash(temporary)){
-		throw SmoothieException(15,temporary,nowLine);
-		return 0;
-	}
-
-	extern int SubNum;
-	SubNum++;
-
-	GlobalProc *pGlobalProc = new GlobalProc( namespaceScopes, temporary, kind, isMacro, isCdecl, isExport );
-
-	//ID
-	static int id_base=0;
-	pGlobalProc->id = (id_base++);
-
-	if(isExport){
-		pGlobalProc->Using();
-	}
-
-	// パラメータを解析
-	// ※第1パラメータにに指定するデータの例："( s As String ) As String"
-	pGlobalProc->SetParamsAndReturnType( buffer + i, nowLine, true );
-
-
-	pGlobalProc->_paramStr = buffer + i;
-
-
-
-	return pGlobalProc;
-}
-bool GlobalProc::AddGlobalProc( const NamespaceScopes &namespaceScopes, char *buffer,int nowLine ){
-	GlobalProc *pGlobalProc = Create( namespaceScopes, buffer, nowLine );
-	if( pGlobalProc == NULL ){
-		return false;
-	}
-
-
-	/////////////////////////////////
-	// ハッシュデータに追加
-	/////////////////////////////////
-
-	int key;
-	key=hash_default(pGlobalProc->GetName().c_str());
-
-	extern GlobalProc **ppSubHash;
-	if(ppSubHash[key]){
-		GlobalProc *psi2;
-		psi2=ppSubHash[key];
-		while(1){
-			//重複エラーチェックを行う
-			if( pGlobalProc->GetName() == psi2->GetName() ){
-				if( Parameter::Equals( psi2->Params(), pGlobalProc->Params() ) ){
-					throw SmoothieException(15,pGlobalProc->GetName().c_str(),nowLine);
-					return 0;
-				}
-			}
-
-			if(psi2->pNextData==0) break;
-			psi2=psi2->pNextData;
-		}
-		psi2->pNextData=pGlobalProc;
-	}
-	else{
-		ppSubHash[key]=pGlobalProc;
-	}
-
-	return true;
-}*/
-const NamespaceScopes &GlobalProc::GetNamespaceScopes() const
-{
-	if( HasParentClass() ){
-		return GetParentClassPtr()->GetNamespaceScopes();
-	}
-	return namespaceScopes;
-}
-bool GlobalProc::IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const
-{
-	if( GetName() != name ){
-		return false;
-	}
-
-	return NamespaceScopes::IsSameArea( GetNamespaceScopes(), namespaceScopes );
-}
-bool GlobalProc::IsEqualSymbol( const GlobalProc &globalProc ) const
-{
-	return IsEqualSymbol( globalProc.GetNamespaceScopes(), globalProc.GetName() );
-}
-bool GlobalProc::IsEqualSymbol( const string &fullName ) const
-{
-	char AreaName[VN_SIZE] = "";		//オブジェクト変数
-	char NestName[VN_SIZE] = "";		//入れ子メンバ
-	bool isNest = CClass::SplitName( fullName.c_str(), AreaName, NestName );
-
-	return IsEqualSymbol( NamespaceScopes( AreaName ), NestName );
 }
 
@@ -588,364 +69,3 @@
 }
 
-
-bool DllProc::SetParamsAndReturnType( const char *sourceOfParams, int nowLine ){
-	int i = 0;
-	int i2,i3,sw;
-	char temporary[8192],temp2[VN_SIZE];
-
-	//ソースコードの位置
-	this->codePos = nowLine;
-
-	//パラメータ
-	if(sourceOfParams[i]!='('){
-		throw SmoothieException(1,NULL,nowLine);
-		return 0;
-	}
-	i++;
-
-	while(1){
-		if(sourceOfParams[i]==')') break;
-
-		//ByRef
-		bool isRef;
-		if(sourceOfParams[i]==1&&sourceOfParams[i+1]==ESC_BYVAL){
-			isRef = false;
-			i+=2;
-		}
-		else if(sourceOfParams[i]==1&&sourceOfParams[i+1]==ESC_BYREF){
-			isRef = true;
-			i+=2;
-		}
-		else isRef = false;
-
-		//パラメータ名
-		bool isArray = false;
-		int subScripts[MAX_ARRAYDIM];
-		char name[VN_SIZE];
-		sw=0;
-		for(i2=0;;i++,i2++){
-			if(sourceOfParams[i]=='('){
-				if(!sw) sw=1;
-
-				i3=GetStringInPare(name+i2,sourceOfParams+i);
-				i2+=i3-1;
-				i+=i3-1;
-				continue;
-			}
-			if(sourceOfParams[i]=='['){
-				if(!sw) sw=1;
-
-				i3=GetStringInBracket(name+i2,sourceOfParams+i);
-				i2+=i3-1;
-				i+=i3-1;
-				continue;
-			}
-			if(!IsVariableChar(sourceOfParams[i])){
-				name[i2]=0;
-				break;
-			}
-			name[i2]=sourceOfParams[i];
-		}
-		if(sw){
-			//配列パラメータ
-			if( isRef == false ) throw SmoothieException(29,NULL,nowLine);
-			isArray = true;
-
-			if((name[i2-2]=='('&&name[i2-1]==')')||
-				(name[i2-2]=='['&&name[i2-1]==']')){
-				subScripts[0]=LONG_MAX;
-				subScripts[1]=-1;
-
-				name[i2-2]=0;
-			}
-			else{
-				GetArrange(name,temp2,subScripts);
-				lstrcpy(name,temp2);
-			}
-
-			i2=lstrlen(name);
-		}
-
-		//型
-		Type type( DEF_NON );
-		if(lstrcmp(name,"...")==0) type.SetBasicType( DEF_ELLIPSE );
-		else if(sourceOfParams[i]==1&&sourceOfParams[i+1]==ESC_AS){
-			i+=2;
-
-			i2=0;
-			while(sourceOfParams[i]=='*'){
-				temporary[i2]=sourceOfParams[i];
-				i++;
-				i2++;
-			}
-			for(;;i++,i2++){
-				if(!IsVariableChar(sourceOfParams[i])){
-					if(sourceOfParams[i]==1&&(sourceOfParams[i+1]==ESC_FUNCTION||sourceOfParams[i+1]==ESC_SUB)){
-						temporary[i2++]=sourceOfParams[i++];
-						temporary[i2]=sourceOfParams[i];
-						continue;
-					}
-					temporary[i2]=0;
-					break;
-				}
-				temporary[i2]=sourceOfParams[i];
-			}
-
-			Type::StringToType( temporary, type );
-
-			if( type.IsNull() ){
-				throw SmoothieException(3,temporary,nowLine);
-				type.SetBasicType( DEF_PTR_VOID );
-			}
-		}
-		else{
-			type.SetBasicType( Type::GetBasicTypeFromSimpleName(temporary) );
-			throw SmoothieException(-103,temporary,nowLine);
-		}
-
-		Parameter *pParam = new Parameter( name, type, isRef );
-		if( isArray ){
-			pParam->SetArray( subScripts );
-		}
-
-		//パラメータを追加
-		this->params.push_back( pParam );
-
-		if(sourceOfParams[i]==','){
-			i++;
-			continue;
-		}
-		else if(sourceOfParams[i]==')') continue;
-		else{
-			throw SmoothieException(1,NULL,nowLine);
-			break;
-		}
-	}
-	i++;
-
-	if(sourceOfParams[i]){
-		///////////////////
-		// 戻り値を取得
-		///////////////////
-
-		i2=lstrlen(sourceOfParams)-2;
-
-		int sw_as=0;
-		for(;i2>0;i2--){
-			if(sourceOfParams[i2]==')') break;
-
-			if(sourceOfParams[i2]==1&&sourceOfParams[i2+1]==ESC_AS){
-				i2+=2;
-				i3=0;
-				while(sourceOfParams[i2]=='*') temporary[i3++]=sourceOfParams[i2++];
-				for(;;i2++,i3++){
-					if(!IsVariableChar(sourceOfParams[i2])){
-						temporary[i3]=0;
-						break;
-					}
-					temporary[i3]=sourceOfParams[i2];
-				}
-				Type::StringToType( temporary, this->returnType );
-				if( this->returnType.IsNull() ) throw SmoothieException(3,temporary,nowLine);
-
-				sw_as=1;
-				break;
-			}
-		}
-	}
-	else{
-		//戻り値なしのSub定義
-		this->returnType.SetNull();
-	}
-
-	return true;
-}
-
-bool ProcPointer::SetParamsAndReturnType( const char *sourceOfParams, int nowLine ){
-	int i = 0;
-	int i2,i3,sw;
-	char temporary[8192],temp2[VN_SIZE];
-
-	//ソースコードの位置
-	this->codePos = nowLine;
-
-	//パラメータ
-	if(sourceOfParams[i]!='('){
-		throw SmoothieException(1,NULL,nowLine);
-		return 0;
-	}
-	i++;
-	while(1){
-		if(sourceOfParams[i]==')') break;
-
-		//ByRef
-		bool isRef;
-		if(sourceOfParams[i]==1&&sourceOfParams[i+1]==ESC_BYVAL){
-			isRef = false;
-			i+=2;
-		}
-		else if(sourceOfParams[i]==1&&sourceOfParams[i+1]==ESC_BYREF){
-			isRef = true;
-			i+=2;
-		}
-		else isRef = false;
-
-		//パラメータ名
-		bool isArray = false;
-		int subScripts[MAX_ARRAYDIM];
-		char name[VN_SIZE];
-		sw=0;
-		for(i2=0;;i++,i2++){
-			if(sourceOfParams[i]=='('){
-				if(!sw) sw=1;
-
-				i3=GetStringInPare(name+i2,sourceOfParams+i);
-				i2+=i3-1;
-				i+=i3-1;
-				continue;
-			}
-			if(sourceOfParams[i]=='['){
-				if(!sw) sw=1;
-
-				i3=GetStringInBracket(name+i2,sourceOfParams+i);
-				i2+=i3-1;
-				i+=i3-1;
-				continue;
-			}
-			if(!IsVariableChar(sourceOfParams[i])){
-				name[i2]=0;
-				break;
-			}
-			name[i2]=sourceOfParams[i];
-		}
-		if(sw){
-			//配列パラメータ
-			if( isRef == false ) throw SmoothieException(29,NULL,nowLine);
-			isArray = true;
-
-			if((name[i2-2]=='('&&name[i2-1]==')')||
-				(name[i2-2]=='['&&name[i2-1]==']')){
-				subScripts[0]=LONG_MAX;
-				subScripts[1]=-1;
-
-				name[i2-2]=0;
-			}
-			else{
-				GetArrange(name,temp2,subScripts);
-				lstrcpy(name,temp2);
-			}
-
-			i2=lstrlen(name);
-		}
-
-		//型
-		Type type( DEF_NON );
-		if(sourceOfParams[i]==1&&sourceOfParams[i+1]==ESC_AS){
-			i+=2;
-
-			i2=0;
-			while(sourceOfParams[i]=='*'){
-				temporary[i2]=sourceOfParams[i];
-				i++;
-				i2++;
-			}
-			for(;;i++,i2++){
-				if(!IsVariableChar(sourceOfParams[i])){
-					if(sourceOfParams[i]==1&&(sourceOfParams[i+1]==ESC_FUNCTION||sourceOfParams[i+1]==ESC_SUB)){
-						temporary[i2++]=sourceOfParams[i++];
-						temporary[i2]=sourceOfParams[i];
-						continue;
-					}
-					temporary[i2]=0;
-					break;
-				}
-				temporary[i2]=sourceOfParams[i];
-			}
-
-			Type::StringToType( temporary, type );
-
-			if( type.IsNull() ){
-				throw SmoothieException(3,temporary,nowLine);
-				type.SetBasicType( DEF_PTR_VOID );
-			}
-		}
-		else{
-			type.SetBasicType( Type::GetBasicTypeFromSimpleName(temporary) );
-			throw SmoothieException(-103,temporary,nowLine);
-		}
-
-		Parameter *pParam = new Parameter( name, type, isRef );
-		if( isArray ){
-			pParam->SetArray( subScripts );
-		}
-
-		//パラメータを追加
-		this->params.push_back( pParam );
-
-		if(sourceOfParams[i]==','){
-			i++;
-			continue;
-		}
-		else if(sourceOfParams[i]==')') continue;
-		else{
-			throw SmoothieException(1,NULL,nowLine);
-			break;
-		}
-	}
-	i++;
-
-	if(sourceOfParams[i]){
-		///////////////////
-		// 戻り値を取得
-		///////////////////
-
-		i2=lstrlen(sourceOfParams)-2;
-
-		int sw_as=0;
-		for(;i2>0;i2--){
-			if(sourceOfParams[i2]==')') break;
-
-			if(sourceOfParams[i2]==1&&sourceOfParams[i2+1]==ESC_AS){
-				i2+=2;
-				i3=0;
-				while(sourceOfParams[i2]=='*') temporary[i3++]=sourceOfParams[i2++];
-				for(;;i2++,i3++){
-					if(!IsVariableChar(sourceOfParams[i2])){
-						temporary[i3]=0;
-						break;
-					}
-					temporary[i3]=sourceOfParams[i2];
-				}
-				Type::StringToType( temporary, this->returnType );
-				if( this->returnType.IsNull() ) throw SmoothieException(3,temporary,nowLine);
-
-				sw_as=1;
-				break;
-			}
-		}
-	}
-	else{
-		//戻り値なしのSub定義
-		this->returnType.SetNull();
-	}
-
-	//戻り値のエラーチェック
-	if( IsFunction() ){
-		// Function定義
-
-		if( this->ReturnType().IsNull() ){
-			// 戻り値がない
-			throw SmoothieException(26,this->GetName(),nowLine);
-		}
-	}
-	else{
-		if( !this->ReturnType().IsNull() ){
-			// Sub定義なのに、戻り値がある
-			throw SmoothieException(38,this->GetName(),nowLine);
-		}
-	}
-
-	return true;
-}
-
 UserProc *UserProc::pCompilingUserProc = NULL;
