for example:
variable1=Dir$(some_path)
vs.
variable1=Dir(some_path)
what is the difference?
why not just do:
variable1=string(Dir(some_path))
for example:
variable1=Dir$(some_path)
vs.
variable1=Dir(some_path)
what is the difference?
why not just do:
variable1=string(Dir(some_path))
Hi there.
I think that the $
version returns a String
, and the non $
version returns a variant
.
http://stackoverflow.com/questions/519579/mid-vs-mid
http://forums.devarticles.com/microsoft-access-development-49/mid-function-vs-mid-26315.html
Cheers. Jas.
The dollar sign indicates a string will be returned instead of a variant.
Dir() returns the result as the variant data type. Dir$() returns the result as the string data type.
some uses $ version for its purported efficiency(as it accepts and outputs statically-typed variables only). I don't know how much is the speed difference between statically-typed and variant type, just benchmark