Bookstore

Recent

Author Topic: Comp type assignment error  (Read 3653 times)

mjen

  • Newbie
  • Posts: 2
Comp type assignment error
« on: February 04, 2011, 03:30:25 pm »
Hello!

The following code generates an error, the variable assignment n5.
I do not understand what's wrong?
The other type works fine, only problem is the Comp.
I have Lazarus 0.9.28.2 beta
Thanks in advance for your help!
Sorry I'm not good in English.

Code: [Select]
var
  n1: real;
  n2: single;
  n3: double;
  n4: extended;
  n5: comp;
  n6: currency;
begin
  n1:=10.0;
  n2:=10.0;
  n3:=10.0;
  n4:=10.0;
  n5:=10.0; // Error: Incompatible types: got "Single" expected "Int64"
  n6:=10.0;
end.

Blaazen

  • Hero Member
  • *****
  • Posts: 2782
  • POKE 54296,15
    • Eye-Candy Controls
Re: Comp type assignment error
« Reply #1 on: February 04, 2011, 03:33:42 pm »
Comp is the same like Int64.
Lazarus 2.1.0 r61214:62238 FPC 3.3.1 r40507 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/