Fix64ToStr liefert unsinnige Zeichen

robert
Benutzer
Avatar
Gender: n/a
Location: Hildesheim / Deutschland
Posts: 249
Registered: 04 / 2006
Subject:

Fix64ToStr liefert unsinnige Zeichen

 · 
Posted: 27.07.2010 - 15:21  ·  #1
Hallo,
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.

rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: Fix64ToStr liefert unsinnige Zeichen

 · 
Posted: 28.07.2010 - 11:40  ·  #2
Hallo Robert,

Bug beseitigt. Trat nur bei Flash > 128kB auf.

rolf
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   51   65 · Page-Gen-Time: 0.025478s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI