Index: Include/basic/prompt.sbp
===================================================================
--- Include/basic/prompt.sbp	(revision 269)
+++ Include/basic/prompt.sbp	(revision 272)
@@ -75,11 +75,11 @@
 
 Sub _PromptSys_Initialize()
-_PromptSys_hInitFinish = CreateEvent(0, FALSE, FALSE, 0)
-Dim _PromptSys_hThread = CreateThread(0, 0, AddressOf(PromptMain), 0, 0, _PromptSys_dwThreadID)
-If _PromptSys_hThread = 0 Then
-	Debug
-	ExitProcess(1)
-End If
-WaitForSingleObject(_PromptSys_hInitFinish, INFINITE)
+	_PromptSys_hInitFinish = CreateEvent(0, FALSE, FALSE, 0)
+	Dim _PromptSys_hThread = CreateThread(0, 0, AddressOf(PromptMain), 0, 0, _PromptSys_dwThreadID)
+	If _PromptSys_hThread = 0 Then
+		Debug
+		ExitProcess(1)
+	End If
+	WaitForSingleObject(_PromptSys_hInitFinish, INFINITE)
 End Sub
 
@@ -191,5 +191,6 @@
 							charLen = 1
 						EndIf
-						_PromptSys_GetTextExtentPoint32(hdc, VarPtr(buf.Chars[i2]) As *StrChar, charLen, sz)
+						Dim p = buf.StrPtr
+						_PromptSys_GetTextExtentPoint32(hdc, VarPtr(p[i2]) As *StrChar, charLen, sz)
 						currentLineCharInfo[.x + 1].StartPos = currentLineCharInfo[.x].StartPos + sz.cx
 /*
@@ -363,9 +364,8 @@
 */
 		Else
-			_PromptSys_InputStr[_PromptSys_InputLen] = wParam As Byte
+			Dim t = wParam As TCHAR
+			TempStr = New String(VarPtr(t), 1)
+			_PromptSys_InputStr[_PromptSys_InputLen] = TempStr[0]
 			_PromptSys_InputLen++
-
-			TempStr.ReSize(1)
-			TempStr[0] = wParam As Char
 		End If
 
@@ -403,9 +403,9 @@
 			Return 0
 		End If
-		Dim tempStr As String
+		Dim tempStr = Nothing As String
 		Dim str As *StrChar
 #ifdef __STRING_IS_NOT_UNICODE
 		Dim size = _PromptWnd_GetCompositionStringA(himc, str)
-		tempStr.Assign(str, size)
+		tempStr = New String(str, size As Long)
 #else
 		Dim osver = System.Environment.OSVersion
@@ -415,8 +415,8 @@
 				Dim strA As PCSTR
 				Dim sizeA = _PromptWnd_GetCompositionStringA(himc, strA)
-				tempStr.AssignFromMultiByte(strA, sizeA)
+				tempStr = New String(strA, sizeA As Long)
 			Else
 				Dim size = _PromptWnd_GetCompositionStringW(himc, str)
-				tempStr.Assign(str, size \ SizeOf (WCHAR))
+				tempStr = New String(str, (size \ SizeOf (WCHAR)) As Long)
 			End If
 		End With
@@ -425,5 +425,5 @@
 		_System_free(str)
 
-		memcpy(VarPtr(_PromptSys_InputStr[_PromptSys_InputLen]), tempStr.Chars, SizeOf (StrChar) * tempStr.Length)
+		ActiveBasic.Strings.ChrCopy(VarPtr(_PromptSys_InputStr[_PromptSys_InputLen]), tempStr.StrPtr, tempStr.Length As SIZE_T)
 		_PromptSys_InputLen += tempStr.Length
 
@@ -583,7 +583,4 @@
 
 Sub INPUT_FromPrompt(showStr As String)
-	Dim i As Long, i2 As Long, i3 As Long
-	Dim buf As String
-
 *InputReStart
 
@@ -599,40 +596,19 @@
 
 	'Set value to variable
-	i = 0
-	i2 = 0
-	buf = ZeroString(lstrlen(_PromptSys_InputStr))
-	While 1
-		i3 = 0
-		While 1
-			If _PromptSys_InputStr[i2] = &h2c Then
-				buf.Chars[i3] = 0
-				Exit While
-			End If
-
-			buf.Chars[i3] = _PromptSys_InputStr[i2]
-
-			If _PromptSys_InputStr[i2] = 0 Then Exit While
-
-			i2++
-			i3++
-		Wend
-
-		_System_Input_SetArgument(_System_InputDataPtr[i], _System_InputDataType[i], buf, i3)
-
-		i++
-		If _System_InputDataPtr[i] = 0 and _PromptSys_InputStr[i2] = &h2c Then 'Asc(",")
+	Const comma = &h2c As StrChar 'Asc(",")
+	Dim broken = ActiveBasic.Strings.Detail.Split(New String(_PromptSys_InputStr), comma)
+	Dim i As Long
+	For i = 0 To ELM(broken.Count)
+		If _System_InputDataPtr[i] = 0 Then
 			ActiveBasic.Prompt.Detail.PRINT_ToPrompt(Ex"入力データの個数が多すぎます\r\n")
 			Goto *InputReStart
-		ElseIf _PromptSys_InputStr[i2] = 0 Then
-			If _System_InputDataPtr[i]<>0 Then
-				ActiveBasic.Prompt.Detail.PRINT_ToPrompt(Ex"入力データの個数が足りません\r\n")
-				Goto *InputReStart
-			Else
-				Exit While
-			End If
-		End If
-
-		i2++
-	Wend
+		End If
+		_System_Input_SetArgument(_System_InputDataPtr[i], _System_InputDataType[i], broken[i].ToString)
+	Next
+
+	If _System_InputDataPtr[i]<>0 Then
+		ActiveBasic.Prompt.Detail.PRINT_ToPrompt(Ex"入力データの個数が足りません\r\n")
+		Goto *InputReStart
+	End If
 End Sub
 
