Changeset 272 for Include/basic/command.sbp
- Timestamp:
- Jun 12, 2007, 7:24:38 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/basic/command.sbp
r269 r272 163 163 Dim _System_InputDataType[_System_MAX_PARMSNUM] As DWord 164 164 Sub INPUT_FromFile(FileNumber As Long) 165 Dim i As Long ,i2 As Long, i3 As Long 166 Dim buffer As String 165 FileNumber-- 166 167 Dim i = 0 As Long 168 Dim i2 As Long, i3 As Long 169 Dim buffer = New System.Text.StringBuilder(GetFileSize(_System_hFile[FileNumber], 0) + 1) 167 170 Dim temp[1] As StrChar 168 171 Dim dwAccessBytes As DWord 169 172 Dim IsStr As Long 170 173 171 FileNumber--172 173 buffer=ZeroString(GetFileSize(_System_hFile[FileNumber],0) + 1)174 175 i=0176 174 While 1 177 175 '次のデータをサーチ … … 226 224 227 225 'データを変数に格納 228 _System_Input_SetArgument(_System_InputDataPtr[i], _System_InputDataType[i], buffer , i3)226 _System_Input_SetArgument(_System_InputDataPtr[i], _System_InputDataType[i], buffer.ToString) 229 227 230 228 … … 234 232 End Sub 235 233 236 Sub _System_Input_SetArgument(arg As VoidPtr, dataType As DWord, ByRef buf As String, bufLen As Long)234 Sub _System_Input_SetArgument(arg As VoidPtr, dataType As DWord, buf As String) 237 235 Select Case dataType 238 236 Case _System_Type_Double … … 253 251 Dim pTempStr As *String 254 252 pTempStr = arg As *String 255 pTempStr->ReSize(bufLen) 256 memcpy(pTempStr->Chars, buf.Chars, SizeOf (StrChar) * pTempStr->Length) 257 pTempStr->Chars[pTempStr->Length] = 0 253 pTempStr[0] = buf 258 254 End Select 259 255 End Sub … … 269 265 Dim _System_UsingStrData[_System_MAX_PARMSNUM] As *Char 'TODO: 暫定対応(動作未確認) 270 266 Dim _System_UsingDataType[_System_MAX_PARMSNUM] As DWord 267 /* 271 268 Function _System_GetUsingFormat(UsingStr As String) As String 272 269 Dim i2 As Long, i3 As Long, i4 As Long, i5 As Long, ParmNum As Long 273 270 Dim temporary[255] As StrChar 274 Dim buffer As String 275 276 buffer = ZeroString(1024) 271 Dim buffer = New System.Text.StringBuilder(1024) 277 272 278 273 ParmNum = 0 … … 334 329 If length_buf>=length_num Then 335 330 '通常時 336 _System_FillChar(VarPtr(buffer.Chars[i3]), length_buf - length_num, &h20) 'Asc(" ")331 ActiveBasic.Strings.Detail.ChrFill(VarPtr(buffer.Chars[i3]), length_buf - length_num, &h20) 'Asc(" ") 337 332 338 333 i3 += length_buf - length_num … … 354 349 Else 355 350 '表示桁が足りないとき 356 _System_FillChar(VarPtr(buffer.Chars[i3]), length_buf, &h23) 'Asc("#")351 ActiveBasic.Strings.Detail.ChrFill(VarPtr(buffer.Chars[i3]), length_buf, &h23) 'Asc("#") 357 352 i3 += length_buf 358 353 End If … … 395 390 i5=i4 396 391 Else 397 _System_FillChar(VarPtr(buffer.Chars[i3]), i4, &h20) 'Asc(" ")392 ActiveBasic.Strings.Detail.ChrFill(VarPtr(buffer.Chars[i3]), i4, &h20) 'Asc(" ") 398 393 End If 399 394 memcpy(VarPtr(buffer.Chars[i3]), _System_UsingStrData[ParmNum], SizeOf (StrChar) * i5) … … 411 406 Wend 412 407 413 _System_GetUsingFormat = Left$(buffer, lstrlen(buffer))408 _System_GetUsingFormat = buffer.ToString(0, lstrlen(StrBPtr(buffer))) 414 409 End Function 410 */ 415 411 Sub PRINTUSING_ToFile(FileNumber As Long, UsingStr As String) 416 412 Dim dwAccessByte As DWord
Note:
See TracChangeset
for help on using the changeset viewer.