Quote:
> Hi all,
> Is Trim() or Trim$() faster/better/preferred? Shall I always use the
> functions that return the exact datatypes? Thanks.
Unless you can motivate the use of Variants, use the exact
data types. The use of exact (read explicit) data types brings
clarity to your code when reading it three weeks later.
VB does a lot of data type conversions behind the scenes when
using the untyped versions. The code
S$ = Trim(A$)
generates code such as (in pseudo-code)
S$ = to_string(Trim$(to_string(A$)))
There really is only one version of these functions, and that
is the Trim$(). Trim() is only a wrapper around it.
As I have said earlier: Be specific. Write what you mean. Only
then others can understand what you ment.
/Peter
--
Peter Lindgren Bachelor of Computer Engineering
Norrsken Konsult, M?lndal, Sweden +46 - (0)31 27 17 09