Conversion logic
-
I don't have the exact code, but a while ago I've seen someone do something like this in VB.Net:
sub codeHorror()
dim amount as integer
dim isTrue as booleanamount = cint(textbox1.text)
' some unrelated code
isTrue = cbool(amount)
' Some unrelated code
amount = cint(isTrue)messagebox.show(cstr(amount))
end sub
The person who did this had little experience with coding, but had done application design on paper (with PST'z) for almost half a year - proof of my school failing at teaching logically.
GSoC 2009 student for SMW! --- My little forums: http://code.bn2vs.com --- 70 72 6F 67 72 61 6D 6D 69 6E 67 20 34 20 6C 69 66 65!
-
I don't have the exact code, but a while ago I've seen someone do something like this in VB.Net:
sub codeHorror()
dim amount as integer
dim isTrue as booleanamount = cint(textbox1.text)
' some unrelated code
isTrue = cbool(amount)
' Some unrelated code
amount = cint(isTrue)messagebox.show(cstr(amount))
end sub
The person who did this had little experience with coding, but had done application design on paper (with PST'z) for almost half a year - proof of my school failing at teaching logically.
GSoC 2009 student for SMW! --- My little forums: http://code.bn2vs.com --- 70 72 6F 67 72 61 6D 6D 69 6E 67 20 34 20 6C 69 66 65!
You know ... sometimes I think that the compiler should'nt compile such a code !! and display a message for the developer :"For God Sake What with the hell is that !!!" :)
Sincerely Samer Abu Rabie Imagination is more important than knowledge !
-
You know ... sometimes I think that the compiler should'nt compile such a code !! and display a message for the developer :"For God Sake What with the hell is that !!!" :)
Sincerely Samer Abu Rabie Imagination is more important than knowledge !
Paperclip: I see that you are trying to... (scratches head) what exactly are you trying to do?
-
Paperclip: I see that you are trying to... (scratches head) what exactly are you trying to do?
:laugh:
Sincerely Samer Abu Rabie Imagination is more important than knowledge !