Changeset 90 for Include/basic/command.sbp
- Timestamp:
- Feb 12, 2007, 12:14:04 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/basic/command.sbp
r89 r90 105 105 '-------------- 106 106 107 Dim _System_hFile(255) As VoidPtr107 Dim _System_hFile(255) As HANDLE 108 108 Macro OPEN(lpFileName As String, AccessFor As Long, FileNumber As Long) 109 109 Dim dwAccess As Long 110 Dim bAppend As Long110 Dim bAppend = 0 As Long 111 111 Dim dwCreationDisposition As Long 112 112 113 FileNumber=FileNumber-1 114 115 bAppend=0 113 FileNumber-- 114 116 115 Select Case AccessFor 117 116 Case 0 … … 134 133 If bAppend Then SetFilePointer(_System_hFile(FileNumber),0,NULL,FILE_END) 135 134 End Macro 135 136 136 Macro CLOSE()(FileNumber As Long) 137 FileNumber =FileNumber-1137 FileNumber-- 138 138 139 139 If _System_hFile(FileNumber) Then … … 153 153 Dim IsStr As Long 154 154 155 FileNumber =FileNumber-1155 FileNumber-- 156 156 157 157 buffer=ZeroString(GetFileSize(_System_hFile[FileNumber],0)) … … 173 173 IsStr=0 174 174 While 1 175 i3 =i3+1175 i3++ 176 176 177 177 i2=ReadFile(_System_hFile[FileNumber],temp,1,VarPtr(dwAccessBytes),ByVal 0) … … 263 263 buffer[i3]=UsingStr[i2] 264 264 If UsingStr[i2]=0 Then Exit While 265 i2 =i2+1266 i3 =i3+1265 i2++ 266 i3++ 267 267 Wend 268 268 … … 283 283 i4=i2 284 284 While UsingStr[i4]=Asc("#") 285 i4 =i4+1285 i4++ 286 286 Wend 287 287 If UsingStr[i4]=Asc(".") Then 288 i4 =i4+1288 i4++ 289 289 290 290 dblRoundOff=0.5 291 291 While UsingStr[i4]=Asc("#") 292 i4 =i4+1293 dblRoundOff =dblRoundOff/10292 i4++ 293 dblRoundOff /= 10 294 294 Wend 295 295 End If … … 304 304 305 305 '符号が有る場合は、一文字分のスペースを考慮する 306 If sign Then length_num =length_num+1306 If sign Then length_num++ 307 307 308 308 length_buf=0 309 309 Do 310 i2 =i2+1311 length_buf =length_buf+1310 i2++ 311 length_buf++ 312 312 Loop While UsingStr[i2]=Asc("#") 313 313 … … 315 315 '通常時 316 316 FillMemory(StrPtr(buffer)+i3,length_buf-length_num,Asc(" ")) 317 i3 =i3+(length_buf-length_num)317 i3 += length_buf - length_num 318 318 319 319 If sign Then 320 320 buffer[i3]=Asc("-") 321 i3 =i3+1322 323 length_num =length_num-1321 i3++ 322 323 length_num-- 324 324 End If 325 325 … … 330 330 End If 331 331 332 i3 =i3+length_num332 i3 += length_num 333 333 Else 334 334 '表示桁が足りないとき 335 335 FillMemory(StrPtr(buffer)+i3,length_buf,Asc("#")) 336 i3 =i3+length_buf336 i3 += length_buf 337 337 End If 338 338 339 339 If UsingStr[i2]=Asc(".") Then 340 340 buffer[i3]=UsingStr[i2] 341 i2 =i2+1342 i3 =i3+1341 i2++ 342 i3++ 343 343 344 344 i4=dec … … 349 349 buffer[i3]=temp2[i4] 350 350 End If 351 i3 =i3+1352 i4 =i4+1353 354 i2 =i2+1351 i3++ 352 i4++ 353 354 i2++ 355 355 Wend 356 356 End If 357 357 ElseIf UsingStr[i2]=Asc("@") Then 358 i2 =i2+1358 i2++ 359 359 360 360 lstrcat(StrPtr(buffer)+i3,_System_UsingStrData[ParmNum]) … … 363 363 i4=0 364 364 Do 365 i4 =i4+1366 i2 =i2+1365 i4++ 366 i2++ 367 367 Loop While UsingStr[i2]=Asc(" ") 368 368 369 369 If UsingStr[i2]=Asc("&") Then 370 i4 =i4+1371 i2 =i2+1370 i4++ 371 i2++ 372 372 i5=lstrlen(_System_UsingStrData[ParmNum]) 373 373 If i4<=i5 Then … … 377 377 End If 378 378 memcpy(StrPtr(buffer)+i3,_System_UsingStrData[ParmNum],i5) 379 i3 =i3+i4379 i3 += i4 380 380 Else 381 i2 =i2-i4381 i2 -= i4 382 382 buffer[i3]=Asc("&") 383 i2 =i2+1384 i3 =i3+1383 i2++ 384 i3++ 385 385 Continue 386 386 End If 387 387 End If 388 388 389 ParmNum =ParmNum+1389 ParmNum++ 390 390 Wend 391 391 … … 396 396 Dim buf As String 397 397 398 FileNumber =FileNumber-1398 FileNumber-- 399 399 buf=_System_GetUsingFormat(UsingStr) 400 400 … … 404 404 Dim _System_FieldSize(255) As Long 405 405 Macro FIELD(FileNumber As Long, FieldSize As Long) 406 FileNumber =FileNumber-1406 FileNumber-- 407 407 408 408 _System_FieldSize(FileNumber)=FieldSize … … 411 411 Dim dwAccessByte As Long 412 412 413 FileNumber =FileNumber-1414 RecodeNumber =RecodeNumber-1413 FileNumber-- 414 RecodeNumber-- 415 415 416 416 SetFilePointer(_System_hFile(FileNumber),RecodeNumber*_System_FieldSize(FileNumber),NULL,FILE_BEGIN) … … 424 424 Dim dwAccessByte As Long 425 425 426 FileNumber =FileNumber-1427 RecodeNumber =RecodeNumber-1426 FileNumber-- 427 RecodeNumber-- 428 428 429 429 SetFilePointer(_System_hFile(FileNumber),RecodeNumber*_System_FieldSize(FileNumber),NULL,FILE_BEGIN) … … 435 435 End Macro 436 436 Macro MKDIR(path As String) 437 CreateDirectory(path, ByVal0)437 CreateDirectory(path, 0) 438 438 End Macro 439 439 Macro KILL(path As String)
Note:
See TracChangeset
for help on using the changeset viewer.