Whats the diff between the MID and MID$ function? 
Author Message
 Whats the diff between the MID and MID$ function?

Hi, I was wondering if somebody could explain the difference between the
MID, FORMAT, MID$ and FORMAT$ functions?

If I am passing a single number to the FORMAT function and returning
"$###,##0" which one should I use?

Thanks,
Bodi



Sat, 02 Sep 2000 03:00:00 GMT  
 Whats the diff between the MID and MID$ function?

The functions with $ on the end return a String variable, and the others
return a Variant. The string versions of these functions are substantially
faster. For one thing, the Mid (Variant version) function has to convert the
variable to a String to work on it, and then convert it back to a Variant
when it returns. Add that to the fact that Variants are slow anyway, and you
realize you'll probably want to be using the String version.

--
Ben Baird, MVP
Microsoft SiteBuilder Network Level 2
Visual Basic Thunder, v. 2.0
http://www.{*filter*}highway.com/~psy/
Common Controls Replacement Project, Official Member
http://www.*-*-*.com/

Quote:

>Hi, I was wondering if somebody could explain the difference between the
>MID, FORMAT, MID$ and FORMAT$ functions?

>If I am passing a single number to the FORMAT function and returning
>"$###,##0" which one should I use?



Tue, 05 Sep 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. mid and mid$

2. Mid/Mid$ Statement sucks

3. What's the difference between mid, mid$, etc

4. QUESTION ABOUT MID AND MID$ PROPERTIES

5. Difference Bet. Mid and Mid$

6. Mid and Mid$

7. Can't find project/library for MID function

8. String extract functions, left,right.mid don't work

9. Updates, Concatenation, and Mid functions

10. Aligning text Left or Mid in MsgBox function/action

11. MID string function is bugging in Access 97

12. Error trying to use a Mid point function in a module

 

 
Powered by phpBB® Forum Software