Results 1 to 3 of 3

Thread: *Basic can't small numbers??

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 1999
    Location
    Prague, Czech Republic
    Posts
    350

    Question

    Hi!

    Try to execute PRINT 30000 + 30000. You can use VBasic instead of QB, but result is same - Owerflow error.

    But 30000 + 40000 is not so big problem...

    It seems you can't to get numbers between 32767 and 62767 (?) when using lower (integer-type) numbers. - This was also the source of my problem when accessing large files; I couldn't set such position number, using any method.

    Okay, you can use 40000 + 30000 + 30000 - 40000, but this is a little bit silly, isn't?

    You can use a AS LONG, b AS LONG; then PRINT a + b, but this is also not so friendly method.

    Does anybody know hot to remove this problem?

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Try:
    Code:
    Debug.Print 30000& + 30000&
    The appended & forces it to a Long.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    Hyperactive Member Al Smith's Avatar
    Join Date
    May 1999
    Location
    Marcellus, MI. USA
    Posts
    330
    Hi,

    You can also use a decimal point.

    Code:
    debug.print 30000. + 30000.
    Al.
    A computer is a tool, not a toy.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width