Sr. Guapo
Swordmaster
USA
272 Posts |
Posted - May 25 2004 : 5:42:13 PM
|
"Dim a,b,c,d,e,f as long Guess which are longs and which get initialized as slow variants?" - 2dcoder
I never realized that (I guess that 'f' is the only long)... that is kinda weird... Could you use: Dim a as Long, b as Long, c as Long...?
Also, about the pointers. I know when you pass arguments to a function, they can be passed ByRef (as opposed to ByVal). I don't know if that is the same as a pointer, but it looks similar...
|
|
|
2dcoder
Knave
83 Posts |
Posted - May 26 2004 : 12:53:23 AM
|
"Dim a,b,c,d,e,f as long"
Yes, only "f" is a long in this example. The rest are slow variants. This is the oldest common error in the VB book! You would need to "dim a as long, b as long," etc.
|
|
|
Eric Coleman
Gladiator
USA
811 Posts |
Posted - May 26 2004 : 07:39:21 AM
|
Only in old versions of VB. That line in VB.net would declare all the variables as a type of "Long." |
|
|
Peter
Administrator
Canada
67 Posts |
Posted - May 26 2004 : 09:53:27 AM
|
I recently upgraded from 98 to XP. So far it is more stable, but I dont like how WinXP Professional is still user-friendlied to the point that it becomes difficult to mess around with your system even if you know what you're doing. It would be great if the pro version gave you more access to your computer, since it is meant for professionals, administrators etc.
But C and C++ will always be faster than VB, no matter how organized and well-written your VB code is. Especially since if you can write fast VB code, you can write even faster C code. VB is more high-level, so everything you do goes through more abstraction, other functions, subroutines, DLLs etc than C does. The advantage of that is it doesnt take a hundred lines of code to create a simple window and you don't get memory leaks or stack dumps and other nice things that can happen if you mess up in C.
The illusion is that if you're making games you can write them faster in VB. In my experience, thats not really true, since by using DirectX or OpenGL you're pretty much not using the features of VB that make it a rapid development language for business apps.
There isn't much difference in development time between
dim a as integer, b as integer, c as integer and int a,b,c;
and you really begin to miss unary operators when you're using VB. Like +=, -=, ++ etc.
But VB does have a much nicer syntax and is more pleasent to program in.
|
Talos Studios - VoodooVB - VB Gamer
|
|
|
Lachlan87
Moderator
USA
160 Posts |
Posted - May 26 2004 : 2:45:25 PM
|
quote: I don't like how WinXP Professional is still user-friendlied to the point that it becomes difficult to mess around with your system even if you know what you're doing.
I hear a lot of people say this, but I haven't heard anyone give any examples. Everything I ever did with 98/2000(which, admittedly is not a real lot), I know how to do easily with XP. I would really like to hear some examples of what you can do with 98/2000 that you can't do easily with XP. I'm not trying to start another IloveXP/IHateXP war, but I assume that the things you are referring to are practical, useful things, and I kind of wonder what I'm missing out on. |
Edited by - Lachlan87 on May 26 2004 2:45:53 PM |
|
|
Sr. Guapo
Swordmaster
USA
272 Posts |
Posted - May 26 2004 : 4:24:15 PM
|
XP is Win 98/2000, plus some extra stuff. There is nothing (that I know of) that you can do in 2000, that cannot be done in XP. The main reason people advocate 2000 is because it is supposedly more stable than all the other versions. Also, XP is designed for a virtually computer illiterate audience.
To answer you're question, XP Home is much worse than the Pro edition, though they both have some problems. The home edition will only allow "System Administrators" to install and uninstall programs, and will not display any hidden files or folders. I realize all of this can be disabled, but it takes alot of searching for the right check boxes. For Example, XP doesn't have the little bar of icons at the bottom for easy acces to programs (though this can be enabled if you search far enough and check the correct boxes in the correct order).
Also with the "user-friendliness": XP has so much graphical asthetics, that it takes up massive amounts of space on the hard drive, and also runs much slower than it should/could. One example is the dancing dog that "helps" you search for files. Another is the "cute" borders around the windows, and the more cartoony 3D buttons. I have turned all of this back to the normal settings (like on 2000), but it is still installed on my hard drive.
I can understand M$ reasons fpr doing this (though it still annoys me). I used to know a person that, in order to free space on his hard drive, deleted the System32 folder, because he didn't recognize any of the files in it as being impoortant. Not pretty...
|
Edited by - Sr. Guapo on May 26 2004 4:25:16 PM |
|
|
Peter
Administrator
Canada
67 Posts |
Posted - May 26 2004 : 10:00:05 PM
|
Well, some of the functionality of 98 is hidden under a few more buttons to press and menus that you have to go through, like to get to the device manager you have to go to start ... control panel ... system ... hardware ... device manager, but other than that its similar to 98.
I was talking more about DOS and Linux. It would be great if in an OS labelled "professional" you could actually mess around with the guts of the system instead of running wizard after endless wizard hoping that it will magically fix something, and this has been a problem ever since Windows 95.
I dont mind the Windows XP interface. If you make an upgrade it might as well look better than the last version. Its not like the extra 0.8 gb of hard drive space is going to hurt you in the realm of 20+ gb harddrives.
|
Talos Studios - VoodooVB - VB Gamer
|
|
|
Sr. Guapo
Swordmaster
USA
272 Posts |
Posted - May 26 2004 : 10:12:56 PM
|
quote: Its not like the extra 0.8 gb of hard drive space is going to hurt you in the realm of 20+ gb harddrives.
When I have 19 GB of various games and unfinished projects, it does... J/K
Anyway, Windows it speciffically designed for non-programmers, not someone who can rummage around in a System folder without deleting WIN_XP.exe... It would be nice if M$ gave the pro version alot more access to those things though... |
Edited by - Sr. Guapo on May 26 2004 10:13:49 PM |
|
|
VBBR
Moderator
Brazil
617 Posts |
Posted - May 28 2004 : 6:21:12 PM
|
Just a side note... hehe... instead of WIN_XP.exe, to be more specific, the person should delete ntoskrnl.exe |
Whatever. Who knows... |
|
|
cjb0087
Knave
Australia
76 Posts |
Posted - May 28 2004 : 8:42:42 PM
|
maybe they should delete C:\Windows\System |
www.bugsplat.tk |
|
|
Sr. Guapo
Swordmaster
USA
272 Posts |
Posted - May 28 2004 : 10:05:44 PM
|
Don't laugh, but that has happened. My mom does customer supprot for a small software company, and one customer deleted the System32 folder, then tried to get their money back for the software, because it did not run properly...
What is "ntoskrnl.exe", anyway. I do not know all the individual files in my WINDOWS folder... |
|
|
VBBR
Moderator
Brazil
617 Posts |
Posted - May 29 2004 : 07:00:27 AM
|
I think it's the main windows kernel executable... One day mine simply stopped working and I needed to re-install the OS... |
Whatever. Who knows... |
|
|
|
|