|
-
Jun 18th, 2013, 11:59 PM
#14
Re: help extract this string
 Originally Posted by Code Doc
I do not see how using longs rather than integers could ever result in more efficient code unless the upper bound is exceeded and stops the program dead in its tracks.
Hi Doc! 
I was just following this tip from the manual:
 Originally Posted by MSDN
Use Long Integer Variables and Integer Math
For arithmetic operations avoid Currency, Single, and Double variables. Use Long integer variables whenever you can, particularly in loops. The Long integer is the 32-bit CPU's native data type, so operations on them are very fast; if you can’t use the Long variable, Integer or Byte data types are the next best choice.
I usually tend to favor speed over memory. That's why I typically use the appropriate type for my variables, constants and numeric literals even if they consume more memory. As mentioned already by Doogle, I prefer to avoid run-time data type conversions whenever possible.
On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|