On Tue, 1 Jan 2008, Lee Jenkins wrote:
> Michael Van Canneyt wrote: > > > > On Tue, 1 Jan 2008, Lee Jenkins wrote: > > > > > I have a method of a class such as: > > > > > > function TMyObject.Test(ACurrency: Currency) > > > begin > > > // do some stuff > > > end; > > > > > > Now, I'll call this method like: > > > > > > MyObject.Test(0.23); > > > > > > The problem is that inside the Test method, the current type is converted > > > to > > > an integer like 2300. > > > > How is this done ? > > > > Currency is actually an int64 type, with a scale factor of 10.000, so this > > is normal. What is not normal is that you see it in your code. > > > > Michael. > > > > That is what is shows in the IDE info tip when hovering the mouse cursor over > the variable. Even more odd is that the variable's value is what the tool tip > displays, the whole integer and not the fractional value passed in. That is an IDE error. > I tried assigning the value to a variable and passed that into the method > instead of passing a literal just in case, but the result is the same. Can you show the code ? Currency has been working just fine as far as I know; this is the first time I heard that there would be some error. Michael. _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives