Mustansir
Legacy and functionality. Go to the immediate window and type:
? Val("45x")
? CInt("45x")
Now do this and compare how these numbers line up:
? Str(1);vbCrLf;CStr(1);vbCrLf;Str(-1);vbCrLf;CStr(-1)
And by the way, Val() returns a Double, so it's closer to CDbl() than CInt().
Plus return type in many cases and a rounding/truncation distinction for
the numeric conversions.
e.g. Str() returns a Variant (String); CStr() returns a String.
Int() truncates, CInt() Bankers' rounds
Adam
--
Excusing bad programming is a shooting offence, no matter _what_ the
circumstances.
-- Linus Torvalds, to the linux-kernel list
"Mustansir" <must...@hotvoice.com> wrote in message
news:#qxPe5YWCHA.1912@tkmsftngp09...
Regards
Paul
"Mustansir" <must...@hotvoice.com> wrote in message
news:#qxPe5YWCHA.1912@tkmsftngp09...
Mustansir
Str adds space for the sign. When the number is positive the string contains
a space at the beginning. CStr does not add that extra space.
--
Eduardo A. Morcillo [MS MVP-VB]
http://www.domaindlx.com/e_morcillo