Ignore:
Timestamp:
Feb 12, 2007, 12:14:04 AM (17 years ago)
Author:
イグトランス (egtra)
Message:

インクリメント・デクリメントなどの活用

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/basic/prompt.sbp

    r89 r90  
    1010Dim _PromptSys_hWnd As HWND
    1111Dim _PromptSys_dwThreadID As DWord
    12 Dim _PromptSys_bInitFinish As Long
     12Dim _PromptSys_bInitFinish As BOOL
    1313
    1414'text
     
    7373        _PromptSys_BackColor[100]=HeapAlloc(_System_hProcessHeap,HEAP_ZERO_MEMORY,255*SizeOf(LONG_PTR))
    7474
    75         _PromptSys_CurPos.y=_PromptSys_CurPos.y-1
     75        _PromptSys_CurPos.y--
    7676
    7777        'Redraw
     
    108108                    temporary,lstrlen(temporary))
    109109
    110                 If IsDBCSLeadByte(temporary[0]) Then i2=i2+1
     110                If IsDBCSLeadByte(temporary[0]) Then i2++
    111111            Next
    112112        End If
    113113
    114         i=i+1
     114        i++
    115115    Wend
    116116
     
    135135                FillMemory(_PromptSys_Buffer[_PromptSys_CurPos.y]+_PromptSys_CurPos.x,i3,Asc(" "))
    136136
    137                 i2=i2+1
    138                 _PromptSys_CurPos.x=_PromptSys_CurPos.x+i3
     137                i2++
     138                _PromptSys_CurPos.x += i3
    139139                Continue
    140140            End If
    141141
    142142            If buf[i2]=13 and buf[i2+1]=10 Then '\r\n
    143                 i2=i2+2
    144                 _PromptSys_CurPos.y=_PromptSys_CurPos.y+1
     143                i2 += 2
     144                _PromptSys_CurPos.y++
    145145                _PromptSys_CurPos.x=0
    146146                Continue
     
    152152            _PromptSys_BackColor[_PromptSys_CurPos.y][_PromptSys_CurPos.x]=_PromptSys_NowBackColor
    153153
    154             i2=i2+1
    155             _PromptSys_CurPos.x=_PromptSys_CurPos.x+1
     154            i2++
     155            _PromptSys_CurPos.x++
    156156        Loop
    157157
     
    440440            If _PromptSys_InputStr[i2]=0 Then Exit While
    441441
    442             i2=i2+1
    443             i3=i3+1
     442            i2++
     443            i3++
    444444        Wend
    445445
     
    466466        End Select
    467467
    468         i=i+1
     468        i++
    469469        If _System_InputDataPtr[i]=0 and _PromptSys_InputStr[i2]=Asc(",") Then
    470470            PRINT_ToPrompt(Ex"入力データの個数が多すぎます\r\n")
     
    499499    i=0
    500500    While _PromptSys_Buffer[y][i]
    501         i=i+1
     501        i++
    502502    Wend
    503503
     
    550550        Ellipse(_PromptSys_hMemDC,x-radius,y-radi2,x+radius,y+radi2)
    551551    Else
    552         StartPos=StartPos*100
    553         EndPos=EndPos*100
     552        StartPos *=StartPos
     553        EndPos *=EndPos
    554554
    555555        If StartPos<0 Or EndPos<0 Then
     
    559559        End If
    560560
    561         If StartPos<0 Then StartPos=StartPos*-1
    562         If EndPos<0 Then EndPos=EndPos*-1
     561        StartPos = Abs(StartPos)
     562        EndPos = Abs(EndPos)
    563563
    564564        If StartPos<=78.5 Then
     
    566566            i2=Int(StartPos)
    567567        ElseIf StartPos<=235.5 Then
    568             StartPos=StartPos-78.5
     568            StartPos -= 78.5
    569569            i1=78-Int(StartPos)
    570570            i2=78
    571571        ElseIf StartPos<=392.5 Then
    572             StartPos=StartPos-235.5
     572            StartPos -= 235.5
    573573            i1=-78
    574574            i2=78-Int(StartPos)
    575575        ElseIf StartPos<=549.5 Then
    576             StartPos=StartPos-392.5
     576            StartPos -= 392.5
    577577            i1=-78+Int(StartPos)
    578578            i2=-78
    579579        ElseIf StartPos<=628 Then
    580             StartPos=StartPos-549.5
     580            StartPos -= 549.5
    581581            i1=78
    582582            i2=-78+Int(StartPos)
     
    587587            i4=Int(EndPos)
    588588        ElseIf EndPos<=235.5 Then
    589             EndPos=EndPos-78.5
     589            EndPos -= 78.5
    590590            i3=78-Int(EndPos)
    591591            i4=78
    592592        ElseIf EndPos<=392.5 Then
    593             EndPos=EndPos-235.5
     593            EndPos -= 235.5
    594594            i3=-78
    595595            i4=78-Int(EndPos)
    596596        ElseIf EndPos<=549.5 Then
    597             EndPos=EndPos-392.5
     597            EndPos -= 392.5
    598598            i3=-78+Int(EndPos)
    599599            i4=-78
    600600        ElseIf EndPos<=628 Then
    601             EndPos=EndPos-549.5
     601            EndPos -= 549.5
    602602            i3=78
    603603            i4=-78+Int(EndPos)
     
    631631
    632632    If bStep Then
    633         ex=sx+ex
    634         ey=sy+ey
     633        ex += sx
     634        ey += sy
    635635    Else
    636636        If fType Then
     
    754754            Input$=Input$+Chr$(_PromptSys_KeyChar)
    755755            _PromptSys_KeyChar=0
    756             i=i+1
     756            i++
    757757            If i>=length Then
    758758                Exit While
Note: See TracChangeset for help on using the changeset viewer.