VB... limitation question

Started by
7 comments, last by Coleco 22 years, 8 months ago
I am a somewhat decent C++ and ASM programmer. For shits-n-giggles (pardon my french) I have been learning Visual Basic (6). For some *STUUUPPPIIIIDDDD* reason, I can't seem to solve this problem. Apparently, VB has put a 32K (32768) limit on EVERYTHING!!!! For example:

    Dim c As Long
    
    c = 500 * 500
    MsgBox c
  
Gives me a runtime error 6 (OVERFLOW)???? Am I missing something??? Is there some magic setting/switch somewhere that says "Yes, VB is allowed to perform real math."??? Also, I am not using some pirated version of VB either...this is the Enterprise edition with SP5 that I bought. Guess I could call MS but I hate talking to those yahoos... HELP!! -Coleco

~ c o l ec o ~

Rock the cradle of love! You stupid WANKER! S i g n a l D E V .com --HASBRO SUCKS-- Edited by - felisandria on July 23, 2001 10:51:23 AM
Rock the cradle of love! You stupid WANKER!
Advertisement
Dim c As Long        c = 500& * 500&MsgBox c 


Fixed. Just part of the language I guess, the & tells it that your numbers are longs, not integers.
Trying is the first step towards failure.
JEESUS!!

Thanks!

Guess I should buy a good book????

:D


-Coleco

~ c o l ec o ~



Rock the cradle of love!
You stupid WANKER!
S i g n a l D E V .com

--HASBRO SUCKS--
Rock the cradle of love! You stupid WANKER!
No, you should use VC++ or Delphi. VB does not expose enough of the internals to anyone who knows a real language.

VB does suck, it''s only good for one thing: System Automation. The same OLE objects are available to VC++ (plus WAY better MFC support), and you don''t have all the fscking idiosyncracies.

---------------
-WarMage
...C. C code good. Compile C! Compile!
if you want to learn VB, why not jump directly to vb.NET? the beta is out there... (and integers are 32 bit)

You know, I never wanted to be a programmer...

Alexandre Moura
VB exposes enough to get plenty done in a timely manner...hence its popularity. It has limitations, but it''s not so limited to be just tossed aside and discarded.

I highly recommend C# for a RAD .NET tool...it''s designed for people who know C++, so the learning curve will be even less than VB6 (or vb.NET).

Epolevne
Epolevne: I''ll see your Win-RAD language and raise you one shitbox IDE

Unless VStudio 6 is some incredible improvement, Borland has M$ beat all to hell in the "Helpful IDE" department IMNSHO.

-------------
-WarMage
...give me _getWindowLong : hWnd or give me Delphi!!
Coleco: I haven''t got any VB books, and right now I''m fairly certain that I won''t be getting any. Just because I''ve found that most VB books won''t tell you the stuff you actually need to know (like the & for longs), the MSDN has all that stuff, and more so I use it.

There are plenty of quality games done in VB, and there will continue to be quality games also, but there will also be plenty of people who say that VB does not have enough power. VB is a higher level language than C++, so it has advantages and disadvantages. C++ is higher level than ASM, so it also has advantages and disadvantages. It is just the nature of programming languages.
Trying is the first step towards failure.
WarMage:
My experience with borland IDEs is limited to C++ 3.1 for DOS (and the freakin'' library of books that came with it)...and Borland C++ 5.0...the absolute buggiest IDE I''ve ever used. 5.0 had two large patches in order to make it slightly stable...most people had to upgrade to 5.02 to make the damn thing work at all.

My MS IDE experience has been good...Intellisense starting with VS5, Extended custom Intellisense with VS.NET. VS.NET is an amazing IDE...I highly recommend it. Microsoft is offering all the .NET compilers for free (included in the .NET framework)...so (when it comes time to buy it) you''re not paying for those, just the kick-ass IDE.



Epolevne

This topic is closed to new replies.

Advertisement