Recent

Author Topic: Problem get value CurrencyEdit  (Read 5710 times)

ecrypt

  • New Member
  • *
  • Posts: 20
Problem get value CurrencyEdit
« on: April 29, 2016, 05:05:41 pm »
//problem only on Lazarus 1.6.0-64-bit in Win7-64-bit

procedure TForm1.CurrencyEdit1Change(Sender: TObject);
var
  a:Currency;
begin
  a:=500;
  CurrencyEdit3.Value:=CurrencyEdit1.Value*a-CurrencyEdit2.Value;

  //examples
  //1 * 500 -100 = 4000000 - (wrong value)
 
end;                     
« Last Edit: April 29, 2016, 07:34:38 pm by ecrypt »
-Lazarus 2.2.7 64bit (Kubuntu-.22.04 amd64)
-ZeosDBO-7.xx
-PostgreSQL-14.3, SQLite-3

Bart

  • Hero Member
  • *****
  • Posts: 5469
    • Bart en Mariska's Webstek
Re: Problem get value CurrencyEdit
« Reply #1 on: April 29, 2016, 06:07:26 pm »
And CurrencyEdit1 is of which type?

Bart

ecrypt

  • New Member
  • *
  • Posts: 20
Re: Problem get value CurrencyEdit
« Reply #2 on: April 29, 2016, 06:20:33 pm »
I try to run this code in the Lazarus 1.6 64 on windows 64 bit
This problem only occurs in 1.6 64 on windows 64 bit and not on other versions
there may be an error

sorry i use google translate
-Lazarus 2.2.7 64bit (Kubuntu-.22.04 amd64)
-ZeosDBO-7.xx
-PostgreSQL-14.3, SQLite-3

ecrypt

  • New Member
  • *
  • Posts: 20
Re: Problem get value CurrencyEdit
« Reply #3 on: April 29, 2016, 06:25:52 pm »
//Run: Lazarus 1.6.0-32-bit in Win7-64-bit and Lazarus 1.6.0-amd64 in Debian-8.2-amd64

procedure TForm1.CurrencyEdit1Change(Sender: TObject);
var
  a:Currency;
begin
  a:=500;
  CurrencyEdit3.Value:=CurrencyEdit1.Value*a-CurrencyEdit2.Value;

  //example i get value
  //1 * 500 -100 = 400 - (right value)
end;

But

//Run: problem only on Lazarus 1.6.0-64-bit in Win7-64-bit

procedure TForm1.CurrencyEdit1Change(Sender: TObject);
var
  a:Currency;
begin
  a:=500;
  CurrencyEdit3.Value:=CurrencyEdit1.Value*a-CurrencyEdit2.Value;

  //example i get value
  //1 * 500 -100 = 4000000 - (wrong value)
 
end;                     

« Last Edit: April 29, 2016, 08:03:15 pm by ecrypt »
-Lazarus 2.2.7 64bit (Kubuntu-.22.04 amd64)
-ZeosDBO-7.xx
-PostgreSQL-14.3, SQLite-3

Bart

  • Hero Member
  • *****
  • Posts: 5469
    • Bart en Mariska's Webstek
Re: Problem get value CurrencyEdit
« Reply #4 on: April 29, 2016, 11:54:06 pm »
Please answer questions asked to you:

And CurrencyEdit1 is of which type?

How the hell do you expect us to help you if you give us isufficient information.

Bart

ecrypt

  • New Member
  • *
  • Posts: 20
Re: Problem get value CurrencyEdit
« Reply #5 on: April 30, 2016, 06:52:10 am »
Please answer questions asked to you:

And CurrencyEdit1 is of which type?

How the hell do you expect us to help you if you give us isufficient information.

Bart

if you use tcurrencyedit rxfpc componnt, you understand this currency type.

if you use lazarus 1.6.0-amd64 on win7-64bit you can try this code.
-Lazarus 2.2.7 64bit (Kubuntu-.22.04 amd64)
-ZeosDBO-7.xx
-PostgreSQL-14.3, SQLite-3

Zath

  • Sr. Member
  • ****
  • Posts: 391
Re: Problem get value CurrencyEdit
« Reply #6 on: April 30, 2016, 12:22:10 pm »
What are you looking for ?
You could use a float variable for currency.

Is there a property setting on the component for number size ?

BrunoK

  • Hero Member
  • *****
  • Posts: 623
  • Retired programmer
Re: Problem get value CurrencyEdit
« Reply #7 on: April 30, 2016, 12:35:20 pm »

Bart

  • Hero Member
  • *****
  • Posts: 5469
    • Bart en Mariska's Webstek
Re: Problem get value CurrencyEdit
« Reply #8 on: April 30, 2016, 11:42:03 pm »
if you use tcurrencyedit rxfpc componnt, you understand this currency type.

OK, next time please describe the component you're having trouble with, especially if it is not installed by default.

Bart

ecrypt

  • New Member
  • *
  • Posts: 20
Re: Problem get value CurrencyEdit
« Reply #9 on: May 03, 2016, 07:29:47 pm »
What are you looking for ?
You could use a float variable for currency.

Is there a property setting on the component for number size ?

My problem would it be similar to

Would it be similar to
http://bugs.freepascal.org/view.php?id=29760

Ok, Thank's BrunoK
-Lazarus 2.2.7 64bit (Kubuntu-.22.04 amd64)
-ZeosDBO-7.xx
-PostgreSQL-14.3, SQLite-3

ecrypt

  • New Member
  • *
  • Posts: 20
Re: Problem get value CurrencyEdit
« Reply #10 on: May 03, 2016, 07:34:16 pm »
if you use tcurrencyedit rxfpc componnt, you understand this currency type.

OK, next time please describe the component you're having trouble with, especially if it is not installed by default.

Bart

Ok, thank's Bart for you'r attention.

Mybe i'am use lazarus 1.6.0 32bit for my project on OS Windows.
-Lazarus 2.2.7 64bit (Kubuntu-.22.04 amd64)
-ZeosDBO-7.xx
-PostgreSQL-14.3, SQLite-3

 

TinyPortal © 2005-2018