Changeset 142 for Include/basic/dos_console.sbp
- Timestamp:
- Mar 9, 2007, 10:15:34 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/basic/dos_console.sbp
r123 r142 20 20 Dim i As Long, i2 As Long, i3 As Long 21 21 Dim buf As String 22 Dim Input Str[1023] As Byte22 Dim InputBuf[1023] As TCHAR 23 23 Dim dwAccessBytes As DWord 24 24 … … 28 28 29 29 '入力 30 ReadConsole(_System_hConsoleIn, Input Str, Len(InputStr), dwAccessBytes, 0)31 If Input Str[dwAccessBytes-2] = &h0d And InputStr[dwAccessBytes-1] = &h0a Then32 Input Str[dwAccessBytes-2] = 030 ReadConsole(_System_hConsoleIn, InputBuf, Len(InputBuf), dwAccessBytes, 0) 31 If InputBuf[dwAccessBytes-2] = &h0d And InputBuf[dwAccessBytes-1] = &h0a Then 32 InputBuf[dwAccessBytes-2] = 0 33 33 End If 34 Dim InputStr As String(InputBuf) 34 35 35 36 'データを変数に格納 … … 59 60 i++ 60 61 If _System_InputDataPtr[i]=0 And InputStr[i2]=comma Then 61 PRINT_ToPrompt( "入力データの個数が多すぎます"+Chr$(10))62 PRINT_ToPrompt(Ex"入力データの個数が多すぎます\r\n") 62 63 Goto *InputReStart 63 64 ElseIf InputStr[i2]=0 Then 64 65 If _System_InputDataPtr[i]<>0 Then 65 PRINT_ToPrompt( "入力データの個数が足りません"+Chr$(10))66 PRINT_ToPrompt(Ex"入力データの個数が足りません\r\n") 66 67 Goto *InputReStart 67 68 Else … … 80 81 Sub PRINT_ToPrompt(buf As String) 81 82 Dim dwAccessBytes As DWord 83 #ifdef __STRING_UNICODE_WINDOWS_ANSI 84 ' Debug 85 Dim oldAlloc = _System_AllocForConvertedString 86 _System_AllocForConvertedString = AddressOf (_System_malloc) 87 Dim pszOut As PCSTR 88 Dim len = GetStr(buf, pszOut) 89 _System_AllocForConvertedString = oldAlloc 90 WriteConsole(_System_hConsoleOut, pszOut, len, dwAccessBytes, 0) 91 _System_free(pszOut) 92 #else 82 93 WriteConsole(_System_hConsoleOut, buf.Chars, buf.Length, dwAccessBytes, 0) 94 #endif 83 95 End Sub 84 96
Note:
See TracChangeset
for help on using the changeset viewer.