Re: [fpc-pascal] Writing floating points to steams

2016-01-12 Thread Michael Schnell
On 01/12/2016 01:40 PM, Torsten Bonde Christiansen wrote: But out of curiosity is there a reason why there are not floating point Read/Write methods for TStream (and decendants)? As procedure TStream.WriteQWord(q: QWord); begin WriteBuffer(q,8); end; it's rather easy to do

Re: [fpc-pascal] Do I need to make fpc 3.0.0 twice?

2016-01-12 Thread Marco van de Voort
In our previous episode, Sven Barth said: > There is a variant of the OPT parameter that applies options only for the > last compilation. This way you can use options that the compiling compiler > does not yet support. Now if I'd only remember that... -.- (for cross > compilation one can use CROSS_

Re: [fpc-pascal] Do I need to make fpc 3.0.0 twice?

2016-01-12 Thread Sven Barth
Am 13.01.2016 00:53 schrieb "Peter" : > But what about optimising the RTL to -O4? > > I did a separate pass to build the RTL with -O4 which 2.64 does not > support. I found it makes a useful difference to the execution speed of > some programs. There is a variant of the OPT parameter that applies

Re: [fpc-pascal] Do I need to make fpc 3.0.0 twice?

2016-01-12 Thread Peter
On 10/01/16 15:35, Jonas Maebe wrote: > On 10/01/16 16:22, Bo Berglund wrote: >> I always use the make all command via the Makefile. >> So do I read you right that the Makefile compiles the compiler twice, >> once using the seed compiler and then using the thus created compiler? > > It compiles it

[fpc-pascal] Problem with Socket Programming

2016-01-12 Thread Helmut weber
Hello, I have some problems with Socket programming under Free Pascal (Windows). Meanwhile I succeded in finding a working Internet Domain Client. But the corresponding server that I found in the official documentation does not work, or better: can not be compiled. Has anyone a source which wor

Re: [fpc-pascal] AVR Busy Wait implementation

2016-01-12 Thread Marc Santhoff
On Mo, 2016-01-11 at 23:19 +0100, Simon Ameis wrote: > Hello, > > has anyone already written a busy wait procedure for AVR or any other > embedded processors? > I'm currently facing issues converting Arduino's calculation of time > (millisecons/microseconds) to cpu cycles as they rely on compile t

Re: [fpc-pascal] Writing floating points to steams

2016-01-12 Thread Torsten Bonde Christiansen
On 2016-01-12 12:38, Michael Van Canneyt wrote: On Tue, 12 Jan 2016, Torsten Bonde Christiansen wrote: On 2016-01-12 12:04, Graeme Geldenhuys wrote: On 2016-01-12 10:45, Torsten Bonde Christiansen wrote: Since TStream doesn't have any native WriteFloat/Double and the likes, some conversion

Re: [fpc-pascal] Writing floating points to steams

2016-01-12 Thread Michael Van Canneyt
On Tue, 12 Jan 2016, Torsten Bonde Christiansen wrote: On 2016-01-12 12:04, Graeme Geldenhuys wrote: On 2016-01-12 10:45, Torsten Bonde Christiansen wrote: Since TStream doesn't have any native WriteFloat/Double and the likes, some conversion is needed - but what is a good strategy for this?

Re: [fpc-pascal] Writing floating points to steams

2016-01-12 Thread Torsten Bonde Christiansen
On 2016-01-12 12:04, Graeme Geldenhuys wrote: On 2016-01-12 10:45, Torsten Bonde Christiansen wrote: Since TStream doesn't have any native WriteFloat/Double and the likes, some conversion is needed - but what is a good strategy for this? I use FloatStr() to do the conversion, then Write() to ac

Re: [fpc-pascal] Writing floating points to steams

2016-01-12 Thread Graeme Geldenhuys
On 2016-01-12 10:45, Torsten Bonde Christiansen wrote: > Since TStream doesn't have any native WriteFloat/Double and the likes, > some conversion is needed - but what is a good strategy for this? I use FloatStr() to do the conversion, then Write() to actually write it to a stream. Regards, -

[fpc-pascal] Writing floating points to steams

2016-01-12 Thread Torsten Bonde Christiansen
Hi all. What is the best/preferred way to write floatingpoint to a steam? Since TStream doesn't have any native WriteFloat/Double and the likes, some conversion is needed - but what is a good strategy for this? A simple conversion like Stream.WriteDWord( DWord(variable>)) is not possible due