how can I do a LONG INTEGER
as long doesn't work very well and integer doesn't work ..
Printable View
how can I do a LONG INTEGER
as long doesn't work very well and integer doesn't work ..
Err... Long is a long integer... what more do you want?
you can't have a long integer
you can have a single, double, long, or integer
double covers off very very long numbers.
Oh right, I take it back :)
ok.....
it's just cause one of my friend said that..
just want to check....
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