Index: Include/basic/command.sbp
===================================================================
--- Include/basic/command.sbp	(revision 121)
+++ Include/basic/command.sbp	(revision 123)
@@ -80,24 +80,24 @@
 Macro INSMENU(hMenu As HMENU, PosID As Long, flag As Long)(lpString As String, id As Long, hSubMenu As HMENU, state As Long)
 	Dim mii As MENUITEMINFO
-
-	FillMemory(VarPtr(mii),Len(mii),0)
-	mii.cbSize=Len(mii)
-	mii.fMask=MIIM_TYPE
-
-	If lpString.Length=0 Then
-		mii.fType=MFT_SEPARATOR
-	Else
-		mii.fType=MFT_STRING
-		mii.fMask=mii.fMask or MIIM_STATE or MIIM_ID
-		mii.dwTypeData=StrPtr(lpString)
-		mii.wID=id
-		If hSubMenu Then
-			mii.fMask=mii.fMask or MIIM_SUBMENU
-			mii.hSubMenu=hSubMenu
+	ZeroMemory(VarPtr(mii), Len(mii))
+	With mii
+		.cbSize = Len(mii)
+		.fMask = MIIM_TYPE
+
+		If lpString.Length = 0 Then
+			mii.fType = MFT_SEPARATOR
+		Else
+			.fType = MFT_STRING
+			.fMask = .fMask or MIIM_STATE or MIIM_ID
+			.dwTypeData = StrPtr(lpString)
+			.wID = id
+			If hSubMenu Then
+				.fMask = .fMask or MIIM_SUBMENU
+				.hSubMenu = hSubMenu
+			End If
+			.fState=state
 		End If
-		mii.fState=state
-	End If
-
-	InsertMenuItem(hMenu,PosID,flag,mii)
+	End With
+	InsertMenuItem(hMenu, PosID, flag, mii)
 End Macro
 
@@ -220,5 +220,5 @@
 End Sub
 
-Function _System_Input_SetArgument(arg As VoidPtr, dataType As DWord, ByRef buf As String, bufLen As Long)
+Sub _System_Input_SetArgument(arg As VoidPtr, dataType As DWord, ByRef buf As String, bufLen As Long)
 	Select Case dataType
 		Case _System_Type_Double
@@ -243,9 +243,9 @@
 			pTempStr->Chars[pTempStr->Length] = 0
 	End Select
-End Function
+End Sub
 
 Sub PRINT_ToFile(FileNumber As Long, buf As String)
 	Dim dwAccessByte As DWord
-	FileNumber=FileNumber-1
+	FileNumber--
 
 	WriteFile(_System_hFile(FileNumber),buf,Len(buf),VarPtr(dwAccessByte),ByVal NULL)
@@ -320,9 +320,10 @@
 			If length_buf>=length_num Then
 				'通常時
-				FillMemory(StrPtr(buffer)+i3,length_buf-length_num,Asc(" "))
+				_System_FillChar(VarPtr(buffer[i3]), length_buf - length_num, &h20) 'Asc(" ")
+
 				i3 += length_buf - length_num
 
 				If sign Then
-					buffer[i3]=Asc("-")
+					buffer[i3] = Asc("-")
 					i3++
 
@@ -330,8 +331,8 @@
 				End If
 
-				If dec>0 Then
-					memcpy(StrPtr(buffer)+i3,temp2,length_num)
+				If dec > 0 Then
+					memcpy(VarPtr(buffer[i3]), temp2, SizeOf (Char) * length_num)
 				Else
-					buffer[i3]=&H30
+					buffer[i3] = &H30
 				End If
 
@@ -339,15 +340,15 @@
 			Else
 				'表示桁が足りないとき
-				FillMemory(StrPtr(buffer)+i3,length_buf,Asc("#"))
+				_System_FillChar(VarPtr(buffer[i3]), length_buf,&h23) 'Asc("#")
 				i3 += length_buf
 			End If
 
-			If UsingStr[i2]=Asc(".") Then
-				buffer[i3]=UsingStr[i2]
+			If UsingStr[i2] = Asc(".") Then
+				buffer[i3] = UsingStr[i2]
 				i2++
 				i3++
 
 				i4=dec
-				While UsingStr[i2]=Asc("#")
+				While UsingStr[i2] = Asc("#")
 					If i4<0 Then
 						buffer[i3]=&H30
@@ -364,6 +365,8 @@
 			i2++
 
-			lstrcat(StrPtr(buffer)+i3,_System_UsingStrData[ParmNum])
-			i3=i3+lstrlen(_System_UsingStrData[ParmNum])
+			'lstrcat(StrPtr(buffer)+i3,_System_UsingStrData[ParmNum])
+			memcpy(VarPtr(buffer[i3 + lstrlen(VarPtr(buffer[i3]))]), _System_UsingStrData[ParmNum], _
+				SizeOf (Char) * lstrlen(_System_UsingStrData[ParmNum]))
+			i3 += lstrlen(_System_UsingStrData[ParmNum])
 		ElseIf UsingStr[i2]=Asc("&") Then
 			i4=0
@@ -380,11 +383,11 @@
 					i5=i4
 				Else
-					FillMemory(StrPtr(buffer)+i3,i4,Asc(" "))
+					_System_FillChar(VarPtr(buffer[i3]), i4, &h20) 'Asc(" ")
 				End If
-				memcpy(StrPtr(buffer)+i3,_System_UsingStrData[ParmNum],i5)
+				memcpy(VarPtr(buffer[i3]), _System_UsingStrData[ParmNum], SizeOf (Char) * i5)
 				i3 += i4
 			Else
 				i2 -= i4
-				buffer[i3]=Asc("&")
+				buffer[i3] = Asc("&")
 				i2++
 				i3++
@@ -396,5 +399,5 @@
 	Wend
 
-	_System_GetUsingFormat=Left$(buffer,lstrlen(buffer))
+	_System_GetUsingFormat = Left$(buffer, lstrlen(buffer))
 End Function
 Sub PRINTUSING_ToFile(FileNumber As Long, UsingStr As String)
