[AccessD] Integer v. Long
Arthur Fuller
fuller.artful at gmail.com
Mon Sep 5 03:15:08 CDT 2022
Frequently I encounter code (most often in samples but sometimes also in
examples, and even in code made available for public consumption) in which
the developer declares numeric variables as Long rather than as Integer.
This practice strikes me as a lazy habit.
Data Type Low Range High Range Storage Requirement (bytes)
Integer -32,768 32,767 2
Long -2,147,483,648 2,147,483,647 4
Granted, if storage and performance were critical, one would probably not
code in VBA. But for most practical purposes in VBA, it seems to me that
Longs are overkill.
Opinions?
--
Arthur
More information about the AccessD
mailing list