Welcome to Emulationworld

Forum Index | FAQ | New User | Login | Search

Make a New PostPrevious ThreadView All ThreadsNext ThreadShow in Flat Mode*


Subjecti was wondering how long it was gonna take. Reply to this message
Posted byTi-BOne
Posted on07/13/06 08:23 AM



before someone trash on VB.

Well, yes, the code is a mess. But i was doing it for a friend in a rush, and i was getting paid for it, to deliver it on time.
Which, btw, i did, ka-fucking-ching! $$!!

But yeah Snow, i agree with you. And i will probably re-write this, now that i have no deadline.

My question was : "why does this if statement ever return true, when i am pretty sure its true", hell i even did this :

label1.caption = "1"
label2.caption = "2"
if label1.caption = label2.caption then
msgbox "it works!"
end if

and it didnīt return me true.

But i fugured why.
I took one If out of the chain, and it work.

The second if statement condition (the one that wasnīt necessary) was the key to get it to work, i simple ended it before checking label1 and label2 and it works. I tried to delete it, but then label1 and label2 returned to their never checking condition.
So i guess it was somewhat necessary.



Now,
VB is understimated. You can do a lot with VB. Its not the best language, true, but at least, i donīt have to type 400 fucking lines to get a fucking simple window drawn in my screen. (Visual C++ ? beh) I havenīt tried .Net stuff properly to say anything, because i donīt own it, and i didnīt feel like downloading all that stuff to do simple codes.

Delphi, on the other hand, seems to be the shit. However, i donīt have time to learn it. Or i am too stupid for it, which is a possibility. Which might be the problem with me learning C and its variants too.

Anyway, VB is not the root of all evil, like some people make it. Its a simple tool, for coding simple programs to do stuff. The kids that try to code a fucking operating system in VB are the stupid ones. Or the ones who thinks they can write a full 3D clone of Quake or whatever is the FPS of the moment using only VB.
But i am aware of its limitations. And for a simple dbase application, VB works, and very well, may i add.

But yeah.. what you said. hehe.







> The problem is that you're using an old and shitty language. Just remember that
> you brought this thrashing upon yourself...
>
> Good god man, you mix your DB code with your form code? Separate that shiznit!
> Have you heard of separating your application into logical layers? Business
> objects? And give your goddam form objects meaningful names! If I had even an
> incling of what relationship Problema12, Problema22, List(2,5,13), etc had then
> maybe it would make this easier to read. And this condition,
>
> If posicao = -1 Then Exit Sub
> If posicao -1 Then
>
> If the first "If" statement isn't true then the second "If" statement has to be
> true! You don't need the second condition at all. And despite my cuntings I've
> taken the time to cut up the code and try to figure out what's going on. The
> question you have is "why doesn't this if statement ever return true?" We have
> no way of ever knowing. Label1.Caption comes from achou which is
> dBase.Field(3), whatever that is. Label2.Caption comes from a list which we
> have no idea what's in it.
>
> Let me ask a simple question. Have you looked at this in the debugger and if
> you have what are the values of Label1.Caption and Label2.Caption when it hits
> this condition?
>
>
>
> pixel-eight.com
>




-
Entire Thread
Subject  Posted byPosted On
*Visual Basic help, anyone ?  Ti-BOne07/12/06 11:10 AM
.*You defile my forum with Visual Basic!?  Snowball 207/12/06 09:11 PM
...i was wondering how long it was gonna take.  Ti-BOne07/13/06 08:23 AM
...*I'm biased  Snowball 207/13/06 08:56 AM
....*Yar  Marv07/13/06 09:05 AM
..*There's also a "Goto" in there ;o) -nt-  Marv07/13/06 01:45 AM
.*Re: Visual Basic help, anyone ?  Marv07/12/06 06:12 PM
..*Re: Visual Basic help, anyone ?  Ti-BOne07/12/06 07:09 PM
...*Re: Visual Basic help, anyone ?  Marv07/13/06 04:57 AM
.*Re: Visual Basic help, anyone ?  arucard07/12/06 11:22 AM
..*Re: Visual Basic help, anyone ?  Ti-BOne07/12/06 01:33 PM