Results 1 to 6 of 6

Thread: how can I do a LONG INTEGER

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    208
    how can I do a LONG INTEGER
    as long doesn't work very well and integer doesn't work ..

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Err... Long is a long integer... what more do you want?
    Harry.

    "From one thing, know ten thousand things."

  3. #3
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    you can't have a long integer
    you can have a single, double, long, or integer

    double covers off very very long numbers.
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  4. #4
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Oh right, I take it back
    Harry.

    "From one thing, know ten thousand things."

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    208
    ok.....
    it's just cause one of my friend said that..
    just want to check....

  6. #6
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    If you're talking about Large Integer (8 bytes) then VB doesn't have this data type, but you can declare your variable as Currency and multiply it by 10,000.
    The classic example would be when you use GetDiskFreeSpaceEx API.

    Code:
    BOOL GetDiskFreeSpaceEx(
      LPCTSTR lpDirectoryName,              // pointer to the directory name
      PULARGE_INTEGER lpFreeBytesAvailableToCaller, // receives the number of bytes on
                                                   // disk available to the caller
      PULARGE_INTEGER lpTotalNumberOfBytes, // receives the number of bytes on disk
      PULARGE_INTEGER lpTotalNumberOfFreeBytes // receives the free bytes on disk
    );

    Also, some VB programmers use user defined data type of 2 longs:
    Code:
    Public Type LargeInteger
        lngUpperInteger As Long
        lngLowerInteger As Long
    End Type
    
    Private lrgNumber As LargeInteger

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