Re: [fpc-pascal] floating point an FPC

2010-03-01 Thread Jerry
On Mar 1, 2010, at 2:32 PM, ik wrote: http://ik.homelinux.org/ On Mon, Mar 1, 2010 at 23:20, Jerry wrote: Don't compare floating points. Ever. Now you see why. So if I need for example to compare currency or something that is floating point, how do I do that ? Also, don't write loops

Re: [fpc-pascal] floating point an FPC

2010-03-01 Thread Jonas Maebe
On 01 Mar 2010, at 22:32, ik wrote: > So if I need for example to compare currency or something that is floating > point, how do I do that ? If it's currency, use the currency type. The currency type is fixed point, not floating point, and that's exactly because floating point is inexact while

Re: [fpc-pascal] floating point an FPC

2010-03-01 Thread ik
http://ik.homelinux.org/ On Mon, Mar 1, 2010 at 23:20, Jerry wrote: > Don't compare floating points. Ever. Now you see why. > So if I need for example to compare currency or something that is floating point, how do I do that ? > > Also, don't write loops that calculate a floating point numbe

Re: [fpc-pascal] floating point an FPC

2010-03-01 Thread Jerry
Don't compare floating points. Ever. Now you see why. Also, don't write loops that calculate a floating point number which is then tested for equality to exit the loop. Also, it is a bad idea to test for > or < for exiting unless you know in advance an accidental equality result will not yi

Re: [fpc-pascal] Which regex unit to use?

2010-03-01 Thread Joost van der Sluis
On Fri, 2010-02-26 at 09:56 +0200, Graeme Geldenhuys wrote: > Hi, > > There are a few regex units include with FPC and Lazarus, and dozens more > available for Delphi (and probably FPC too). > > Which one is the most well known, or best to use, or most feature complete > regarding syntax etc...?

Re: [fpc-pascal] GetEnumerator on Generics

2010-03-01 Thread Paul Ishenin
01.03.2010 15:17, Neil Graham wrote: Which, somewhat laboriously, brings me to my query. I'm shunting all of the containers from fgl into the standard Thefbi unit and removing the 'fpg' from the class prefixes. So on my system tList is the tFPGList fro fgl. I'd like to add a GetEnumerator to thos

[fpc-pascal] GetEnumerator on Generics

2010-03-01 Thread Neil Graham
So some things, I'm working on a browser plugin http://code.google.com/p/thefbi/ And I've made a Thefbi Target for Freepascal, The example page shown in the screenshot http://thefbi.googlecode.com/svn/wiki/images/Thefbishot7.png Is actally written in Freepascal, So if people are interested in