arm-wince SizeOf(Extended) lazarus / 8-Other ---------------------------------------------------------------------- roeug · 2006-11-08 19:20 I don't understand why SizeOf(Extended) returns 8 in wince-arm: procedure TForm1.FormCreate(Sender: TObject); var  aStr: string; begin   aStr:= ' SizeOf(Extended)='+IntToStr( SizeOf(Extended));   Memo1.Lines.Add(aStr); end; I was sure in 10 as in win32-i386 (and I have 10 on PC-lazarus) I want to use binary files prepared on PC (and well tested). Please, how can I fix the problem ? ---------------------------------------------------------------------- felipemdc · 2006-11-08 19:24 I don't think this is a problem. The ARM processor requires that all data be 4 bytes aligned or else it will fail accessing it. So I guess Extended is implemented with 8 bits on ARM (just a wild guess). Why is this a problem for you? ---------------------------------------------------------------------- roeug · 2006-11-09 06:52 I don't remember why but some years ego I have decided to store all my float data as extended (in bin files). To read data from file into the application I use Stream.read(fFloat1, SizeOf(fFloat)); Stream.read(fFloat2, SizeOf(fFloat)); ... Sure if SizeOf(fFloat)<>10 (win32-i386 ==10) I have stream positioning errors I think at the moment the simplest decision is to convert my data file preparing program (win32-i386) to store floats as double. Is double the same for win32-i386 and wince-arm ? I have found in arm\aasmcpu.pas /*       TABLE 1  +-------------------------+---+---+---------+---------+  |  Precision .................| u | v | FPSR.EP | length  |  +-------------------------+---+---+---------+---------+  | Single.......................| 0 | 0 |    x        | 1 words |  | Double......................| 1 | 1 |    x        | 2 words |  | Extended...................| 1 | 1 |    x        | 3 words |  | Packed decimal..........| 1 | 1 |    0        | 3 words |  | Expanded packed dec | 1 | 1 |    1        | 4 words |  +-------------------------+---+---+---------+---------+  Note: x = don't care  */ But the only thing I understand from it for Double length =2 words What about mantissa and exponent (or "don't care") ---------------------------------------------------------------------- felipemdc · 2006-11-09 12:56 Umm ... I think it's better if you ask this on the Free Pascal mailling list. This forum is mostly for IDE issues. There (on fp mailling list), the compiler experts can help you with your problem. ---------------------------------------------------------------------- roeug · 2006-11-15 04:49 The DWORDS of Double Qword are interswaped: LoDWORD_arm(Double) = HiDWORD_i386(Double)