Re: [fpc-pascal] Extended, Currency and TDateTime memory layout

2010-08-07 Thread Felipe Monteiro de Carvalho
On Sat, Aug 7, 2010 at 10:44 PM, Zaher Dirkey wrote: > A Currency is a Int64 not float, if you assign currency to float variable > (double/extended) and return back to currency variable, you will not get the > same value. Interresting enough, the exact same value is returned. From my research on

Re: [fpc-pascal] Extended, Currency and TDateTime memory layout

2010-08-07 Thread Felipe Monteiro de Carvalho
Hello, I managed to read the extended by putting it in a program like this: procedure TForm1.Button1Click(Sender: TObject); var Hex: array[0..9] of Byte; Num: Extended; begin Hex[0] := $00; Hex[1] := $00; Hex[2] := $00; Hex[3] := $00; Hex[4] := $00; Hex[5] := $00; Hex[6] := $00;

Re: [fpc-pascal] Extended, Currency and TDateTime memory layout

2010-08-07 Thread Felipe Monteiro de Carvalho
On Sat, Aug 7, 2010 at 10:44 PM, Zaher Dirkey wrote: > A Currency is a Int64 not float, if you assign currency to float variable > (double/extended) and return back to currency variable, you will not get the > same value. Yes, but I didn't write the server I just need to interface with it's

Re: [fpc-pascal] Extended, Currency and TDateTime memory layout

2010-08-07 Thread Zaher Dirkey
On Sat, Aug 7, 2010 at 9:56 PM, Felipe Monteiro de Carvalho < felipemonteiro.carva...@gmail.com> wrote: > > A currency is a Int64, which is the currency amount multiplied by 1. > > Well, apparently Delphi 6 RTTI thinks that it is a float. Check this code: > > 471 else if ElmTypeI

Re: [fpc-pascal] Extended, Currency and TDateTime memory layout

2010-08-07 Thread Felipe Monteiro de Carvalho
For single and double there is a nice converter which shows the binary layout: http://babbage.cs.qc.edu/IEEE-754/Decimal.html Unfortunately there seams to be much less resources about extended... On Fri, Aug 6, 2010 at 4:52 PM, Michael Van Canneyt wrote: > Strange, because tkCurrency exists ? >

[fpc-pascal] Bug: FPC doesn't perform variable substitution in #INCLUDE-preprocessors

2010-08-07 Thread Jetcheng Chu
Hi all, Since the bug reporting system keeps rejecting my login, I'm posting here about this bug. I want to have per-project configuration files yet still let the global one processed first. With the #INCLUDE preprocessor, I can load hardcoded configuration files, but not if the pathname contain