Changeset 110 for Include/basic/dos_console.sbp
- Timestamp:
- Feb 18, 2007, 11:19:00 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/basic/dos_console.sbp
r1 r110 10 10 11 11 Dim _System_hConsoleOut As HANDLE, _System_hConsoleIn As HANDLE 12 _System_hConsoleOut =GetStdHandle(STD_OUTPUT_HANDLE)13 _System_hConsoleIn =GetStdHandle(STD_INPUT_HANDLE)12 _System_hConsoleOut = GetStdHandle(STD_OUTPUT_HANDLE) 13 _System_hConsoleIn = GetStdHandle(STD_INPUT_HANDLE) 14 14 15 15 '---------- command.sbp内で定義済み ---------- … … 18 18 '--------------------------------------------- 19 19 Sub INPUT_FromPrompt(ShowStr As String) 20 Dim i As Long ,i2 As Long, i3 As Long20 Dim i As Long, i2 As Long, i3 As Long 21 21 Dim buf As String 22 22 Dim InputStr[1023] As Byte … … 28 28 29 29 '入力 30 ReadFile(_System_hConsoleIn,InputStr,1024,VarPtr(dwAccessBytes),ByVal 0) 31 InputStr[dwAccessBytes-2]=0 30 ReadConsole(_System_hConsoleIn, InputStr, Len(InputStr), dwAccessBytes, 0) 31 If InputStr[dwAccessBytes-2] = &h0d And InputStr[dwAccessBytes-1] = &h0a Then 32 InputStr[dwAccessBytes-2] = 0 33 End If 32 34 33 35 'データを変数に格納 … … 35 37 i2=0 36 38 buf.ReSize(lstrlen(InputStr) + 1, 0) 37 Dim comma As Byte38 comma = Asc(",")39 Dim comma As Char 40 comma = &h2c 'Asc(",") 39 41 While 1 40 42 i3=0 … … 73 75 74 76 i++ 75 If _System_InputDataPtr[i]=0 and InputStr[i2]=comma Then77 If _System_InputDataPtr[i]=0 And InputStr[i2]=comma Then 76 78 PRINT_ToPrompt("入力データの個数が多すぎます"+Chr$(10)) 77 79 Goto *InputReStart … … 90 92 91 93 Macro LOCATE(x As Long, y As Long) 92 SetConsoleCursorPosition(_System_hConsoleOut, MAKELONG(x ,y))94 SetConsoleCursorPosition(_System_hConsoleOut, MAKELONG(x, y)) 93 95 End Macro 94 96 95 97 Sub PRINT_ToPrompt(buf As String) 96 98 Dim dwAccessBytes As DWord 97 Write File(_System_hConsoleOut, buf.Chars, buf.Length, VarPtr(dwAccessBytes), ByVal0)99 WriteConsole(_System_hConsoleOut, buf.Chars, buf.Length, dwAccessBytes, 0) 98 100 End Sub 99 101
Note:
See TracChangeset
for help on using the changeset viewer.