Re: [fpc-pascal] Freepascal Floating Point Issue

2017-08-21 Thread bernd.oppol...@t-online.de
https://www.facebook.com/notes/new-stanford-pascal-compiler/floating-point-output-differences-between-platforms/365845753799072 / other Pascal Implementations have t

Re: [fpc-pascal] H2pas tool vs others, C header translation

2017-08-21 Thread noreply
On 2017-08-21 20:34, Dmitry Boyarintsev wrote: On Sun, Aug 20, 2017 at 5:37 PM, wrote: Is there a competing tool that does more, or is updated more? How about this list? http://wiki.freepascal.org/C_to_Pascal That's a good one, I missed that.. could not find it previously when searching g

Re: [fpc-pascal] Freepascal Floating Point Issue

2017-08-21 Thread Sven Barth via fpc-pascal
Am 22.08.2017 00:02 schrieb "James Richters" : The others already wrote about floating point precision, so I won't repeat that. > The reason I noticed this is because I have some conditional statements like > If Draw_GX_Min<>99.999 then > Something *DON'T* compare floating point numbers

Re: [fpc-pascal] H2pas tool vs others, C header translation

2017-08-21 Thread Dmitry Boyarintsev
On Sun, Aug 20, 2017 at 5:37 PM, wrote: > > Is there a competing tool that does more, or is updated more? > How about this list? http://wiki.freepascal.org/C_to_Pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.

Re: [fpc-pascal] H2pas tool vs others, C header translation

2017-08-21 Thread Dmitry Boyarintsev
On Sun, Aug 20, 2017 at 5:37 PM, wrote: > Is h2pas for example the one that is used for Mysql header translations > and other major C headers? > I'm using Chelper. (http://wiki.freepascal.org/Chelper) It's my choice, because it preserves comments (which is usually an important part of open-sour

Re: [fpc-pascal] Freepascal Floating Point Issue

2017-08-21 Thread Daniel Franzini
Long story short: not every single real number have an *exact* representation in the computer. You have to live with that and learn the limitations and pitfalls of floating point calculations. On Mon, Aug 21, 2017 at 7:42 PM, Ralf Quint wrote: > On 8/21/2017 3:34 PM, Daniel Franzini wrote: > > I

Re: [fpc-pascal] Freepascal Floating Point Issue

2017-08-21 Thread Ralf Quint
On 8/21/2017 3:34 PM, Daniel Franzini wrote: > It might be the case (I didn't do the math) that 999.999 doesn't have > an exact representation in IEEE-754 double-precision format, so the > best you get is an aproximation (a pretty good one, btw). Just use WriteLn (Draw_GX_Min:3:16) and you get no m

Re: [fpc-pascal] Freepascal Floating Point Issue

2017-08-21 Thread Daniel Franzini
It might be the case (I didn't do the math) that 999.999 doesn't have an exact representation in IEEE-754 double-precision format, so the best you get is an aproximation (a pretty good one, btw). On Mon, Aug 21, 2017 at 7:10 PM, Ralf Quint wrote: > On 8/21/2017 3:02 PM, James Richters wrote: > >

Re: [fpc-pascal] Freepascal Floating Point Issue

2017-08-21 Thread Ralf Quint
On 8/21/2017 3:02 PM, James Richters wrote: > I am having an issue with a simple floating point application. I am setting > a variable to a specific value and immediately after I set it, it is not > exactly what I set it to. Here's an example > >Draw_GX_Min:=999.999; >Writeln(Draw_GX_M

[fpc-pascal] Freepascal Floating Point Issue

2017-08-21 Thread James Richters
I am having an issue with a simple floating point application. I am setting a variable to a specific value and immediately after I set it, it is not exactly what I set it to. Here's an example Draw_GX_Min:=999.999; Writeln(Draw_GX_Min:3:30); The writeln results in 999.999002000

Re: [fpc-pascal] fpReport released

2017-08-21 Thread leledumbo via fpc-pascal
> fpreport has been committed to FPC SVN: packages/fcl-report. > It should compile on windows, linux, freebsd and darwin. From the wiki: "An important use-case was a Linux server running in a container without X libraries installed" Yep, yep, yep. Finally I can replace my old statically designed

Re: [fpc-pascal] H2pas tool vs others, C header translation

2017-08-21 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: > > I am looking to convert the GNU MPFR library header files, or hire > > someone on a bounty to do it if header translation is not so easy with > > h2pas and requires lots of hand work, and close checking. > > I do all header translations with

[fpc-pascal] StringOfChar for Unicode/Widestring

2017-08-21 Thread Bart
Hi, Do we have a StringOfChar function for UnicodeString/WideString in FreePascal? I could not find it in 3.0.4RC1 (which may tell you more about me that fpc). Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org

Re: [fpc-pascal] TStringHelper missing

2017-08-21 Thread Sven Barth via fpc-pascal
Am 21.08.2017 13:51 schrieb "Sven Barth" : > > Am 21.08.2017 08:23 schrieb "Michael Van Canneyt" : > > > > > > > > On Mon, 21 Aug 2017, Ryan Joseph wrote: > > > >> I’m trying to split a string by a delimiter and see there is a type helper called TStringHelper ( https://www.freepascal.org/docs-html/

Re: [fpc-pascal] TStringHelper missing

2017-08-21 Thread Sven Barth via fpc-pascal
Am 21.08.2017 08:23 schrieb "Michael Van Canneyt" : > > > > On Mon, 21 Aug 2017, Ryan Joseph wrote: > >> I’m trying to split a string by a delimiter and see there is a type helper called TStringHelper ( https://www.freepascal.org/docs-html/rtl/sysutils/tstringhelper.html). The compiler version I’m