Hallo,
Fix64ToStr in Verbindung mit WriteLn hat einen Bug. Zuweisung zu einem String ist Ok.
Gruß
Robert
Fix64ToStr in Verbindung mit WriteLn hat einen Bug. Zuweisung zu einem String ist Ok.
Gruß
Robert
Code
program t2560;
Device = mega2560, VCC=5;
Import
SysTick,
SerPort;
from System import
FIX64,
longword;
Define
ProcClock = 16000000; {Hertz}
SysTick = 10; {msec}
StackSize = $0100, iData;
FrameSize = $0100, iData;
{------------------------------------------------------------------------------}
SerPort = 57600, Stop2; {Baud, StopBits|Parity}
RxBuffer = 20, iData;
TxBuffer = 20, iData;
{------------------------------------------------------------------------------}
USES
;
Implementation
type
const
VAR
{$IDATA}
f : FIX64;
s : string[50];
begin
EnableInts;
f := 52.045632333;
WriteLn(SerOut, Fix64ToStr(f)); //Fehlerhafte Ausgabe
s := Fix64ToStr(f);
WriteLn(SerOut, s); //OK
end t2560.
Device = mega2560, VCC=5;
Import
SysTick,
SerPort;
from System import
FIX64,
longword;
Define
ProcClock = 16000000; {Hertz}
SysTick = 10; {msec}
StackSize = $0100, iData;
FrameSize = $0100, iData;
{------------------------------------------------------------------------------}
SerPort = 57600, Stop2; {Baud, StopBits|Parity}
RxBuffer = 20, iData;
TxBuffer = 20, iData;
{------------------------------------------------------------------------------}
USES
;
Implementation
type
const
VAR
{$IDATA}
f : FIX64;
s : string[50];
begin
EnableInts;
f := 52.045632333;
WriteLn(SerOut, Fix64ToStr(f)); //Fehlerhafte Ausgabe
s := Fix64ToStr(f);
WriteLn(SerOut, s); //OK
end t2560.