Could somebody give me an example of a logic error - perhaps if you have time to waste, write a small piece of code so I could try to track it down? (Pretty please) :D
many thanks
Printable View
Could somebody give me an example of a logic error - perhaps if you have time to waste, write a small piece of code so I could try to track it down? (Pretty please) :D
many thanks
You made a logic error in your post... Because your post doesn't make any logical sense ;)
Quote:
Originally posted by mbonfyre
Could somebody give me an example of a logic error - perhaps if you have time to waste, write a small piece of code so I could try to track it down? (Pretty please) :D
many thanks
VB Code:
Dim i As Integer Private Sub Command1_Click() For i = 1 To 5 Call HoseIt DoEvents Next i End Sub Sub HoseIt() For i = 1 To 2 MsgBox "hosed" Next i End Sub
:DCode:Private Sub Form_Load()
Dim d As Double
d = 4 * 10000
End Sub
Just cut and paste the code onto a VB form, no need to add any controls.
Have fun.
VB Code:
Option Explicit Private WithEvents cmdDeleteAll As VB.CommandButton Private lstNumbers As VB.ListBox Private Sub cmdDeleteAll_Click() Dim lngItem As Long For lngItem = 1 To lstNumbers.ListCount lstNumbers.RemoveItem lngItem Next End Sub Private Sub Form_Load() Dim lngItem As Long Set lstNumbers = Me.Controls.Add("VB.ListBox", "List1") lstNumbers.Move 0, 0, 1000, ScaleHeight lstNumbers.Visible = True For lngItem = 1 To 10 lstNumbers.AddItem lngItem Next Set cmdDeleteAll = Me.Controls.Add("VB.CommandButton", "List1") cmdDeleteAll.Caption = "Delete All" cmdDeleteAll.Move 0, 0, 1000 cmdDeleteAll.Visible = True End Sub
Logic error:
1=2 :rolleyes:
click here
:rolleyes:
:mad: :p ZzzzZZZzzzzZZZz!!Quote:
Originally posted by crptcblade
click here
:rolleyes:
actually nothing wrong with that ... false expressions are allowed :DQuote:
Originally posted by BuggyProgrammer
Logic error:
1=2 :rolleyes: