Recent

Author Topic: This code from Turbo Pascal worked, but not in Lazarus?  (Read 4432 times)

Elmug

  • Hero Member
  • *****
  • Posts: 849
This code from Turbo Pascal worked, but not in Lazarus?
« on: July 19, 2011, 11:47:39 pm »
FloatSpinEdit2.value :=  Sqrt(-.5 * .5 +1);

Lazarus gives two messages:

unit1.pas(40,38) Error: Illegal expression
unit1.pas(40,39) Fatal: Syntax error, ")" expected but "ordinal const" found


Thanks.

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: This code from Turbo Pascal worked, but not in Lazarus?
« Reply #1 on: July 19, 2011, 11:51:03 pm »
Compiler only wants zeros.
Code: [Select]
  FloatSpinEdit2.value :=  Sqrt(-0.5 * 0.5 +1);
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 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/

Elmug

  • Hero Member
  • *****
  • Posts: 849
Re: This code from Turbo Pascal worked, but not in Lazarus?
« Reply #2 on: July 19, 2011, 11:58:32 pm »
Compiler only wants zeros.
Code: [Select]
  FloatSpinEdit2.value :=  Sqrt(-0.5 * 0.5 +1);

Thanks Blaazen, I wish you'd written the error messages! ::)

 

TinyPortal © 2005-2018