-
Nov 8th, 2002, 02:54 AM
#1
Thread Starter
Frenzied Member
Trim
What is the difference between trim and trim$?
-
Nov 8th, 2002, 03:13 AM
#2
To my knowledge, there is no difference. My VB help doesn't say anything about Trim$ though. I guess it's the same command. I guess there can be Mid$ too and it's no different from normal...
Correct if I'm wrong. But I can't think of any reason for them to be different.
Edit: just to notice, I've used VB for five years
Last edited by Merri; Nov 8th, 2002 at 03:17 AM.
-
Nov 8th, 2002, 03:32 AM
#3
All string functions in VB have two versions, one with a $ and one without. The functions that end in a $ return a String while the others return a Variant (of string type). I was surprised that this wasn't mentioned in the help file.
The $ functions are somewhat faster than their counterparts because typically there is no need to perform any datatype conversions.
-
Nov 8th, 2002, 04:58 AM
#4
The reason might be that I have old Visual Basic 4 and it's help file. But it's very nice to know this
-
Nov 8th, 2002, 06:52 AM
#5
Iv'e read that the $ are ment to be used only for strings and the Mid() Trim() should be used for only integers.....but it works both ways...
Visual Studio 6, Visual Studio.NET 2005, MASM
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
|