March 18th, 2005, 06:23 PM
Convert to Double
I'm having yet another problem converting code from VB6 to Python. This time it is with CDbl(). I read up on MSDN for what CDbl() does, I got the following example:
Now I don't know every feature that Python has that is like something that VB6 has. The only functions in VB6 such as CInt and CLng, I used int() for them in Python, however, with CDbl, this doesn't seem to be the case. The only Python function I thought of that could handle something like this was int(), only I still don't think that will work. Are there any other solutions?
Dim MyCurr, MyDouble
MyCurr = CCur(234.456784) ' MyCurr is a Currency (234.4567).
MyDouble = CDbl(MyCurr * 8.2 * 0.01) ' Convert result to a Double (19.2254576).
March 18th, 2005, 07:11 PM
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
"I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
March 18th, 2005, 08:17 PM
Thanks again Scorpions4Ever.