Re: [fpc-pascal] undefining multiple defines

2005-03-06 Thread Marc Santhoff
Am So, den 06.03.2005 schrieb Olle Raab um 23:30: > 05-03-03 10.55, skrev Marc Santhoff följande: > > > Am Do, den 03.03.2005 schrieb Marco van de Voort um 08:32: > >>> unit b; > >>> ... > >>> {$undef M1-M15} > >> > >> Such constructs won't work, for the same reason that variablenames with > >> n

Re: [fpc-pascal] undefining multiple defines

2005-03-06 Thread Olle Raab
05-03-03 10.55, skrev Marc Santhoff följande: > Am Do, den 03.03.2005 schrieb Marco van de Voort um 08:32: >>> unit b; >>> ... >>> {$undef M1-M15} >> >> Such constructs won't work, for the same reason that variablenames with >> numbers in it can't be used as such. >> >> For the compiler it is an

Re: [fpc-pascal] float calculates rubbish

2005-03-06 Thread Marc Santhoff
Am So, den 06.03.2005 schrieb Marco van de Voort um 23:02: > > $ ./testlongfloat > > 1109081216 > > 1109081216.00 > > 554540608 > > 554540608.00 > > > > Am I producing a value overflow here or what's happening? The whole > > thing is running on i386 with fpc 1.9.4. > > glib redefined float as 32-

Re: [fpc-pascal] float calculates rubbish

2005-03-06 Thread Marco van de Voort
> $ ./testlongfloat > 1109081216 > 1109081216.00 > 554540608 > 554540608.00 > > Am I producing a value overflow here or what's happening? The whole > thing is running on i386 with fpc 1.9.4. glib redefined float as 32-bit single, which has much lower precision, which in turn causes the rounding.

[fpc-pascal] float calculates rubbish

2005-03-06 Thread Marc Santhoff
Hi, i was confused and defined some real values as float in a GTK program. GDK (glib.pp) defines float as single. Look what happened: program testlongfloat; uses sysutils, glib; const c1: float = 1109081270; c2: float = 1109081270 / 2; BEGIN writeln(inttostr(trunc((c1