LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Modern day considerations, Integer versus Long

hi
none really. an integer is 1 byte, a long is 2 bytes. when dos first came
out and IMB decided that 64000 byte would be all the memory anyone would ever
need, 1 byte may have been signifcant but today where memory is measured in
megabyes and gigabyles, 1 byte is insignificant.
an integer will represent a number value of 32767(pos or neg). the number
value of today's date is 40222 meaning you would get overflow errors trying
to assign a date to a variable dimmed as an integer. personally i never use
integer anymore.
in vb help, type in "data types" and view the table of data types. the
largest is variant which is about 20 bytes which in my opion is still fairly
insignificant.
I wouldn't really worry about it anymore. only if and when you do get an
overflow error would you need to think about it.

regards
FSt1

"Neal Zimm" wrote:

Hi All,
I come from a day when storage was a LOT dearer than it is today.

I use Integer or Long for whole # values 'cuz I read once that Integer
takes less memory. It's also kind of self documenting about the size of the
#.

With memory gigs now about the size of a thumbnail, what are the major
pro's and cons of still using As Integer versus As Long.

Thanks.
--
Neal Z

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA code optimization - why using long instead of integer? Thao Excel Programming 4 August 28th 08 08:43 PM
GMT/UTC considerations ffzeus Excel Worksheet Functions 9 January 7th 06 09:48 PM
Declaring variables (Long, String, Integer) and interpretation spe MrT Excel Programming 4 December 12th 04 12:43 PM
Hash a range, output a Long Integer? Stephen Rasey[_2_] Excel Programming 2 June 12th 04 04:59 AM
calculate/concert long/integer to date time Yejeet Excel Programming 2 October 7th 03 10:39 PM


All times are GMT +1. The time now is 11:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"