On Mon, Oct 19, 2009 at 02:57:10PM -0300, Gustavo Enrique Jimenez wrote:
2009/10/18 Tom Verhoeff t.verho...@tue.nl:
A simple example is the situation where one needs to calculate
the replacement resistor value R for parallel resistors having
values R1, R2, ..., Rk. The formula is R = 1/(1
On Mon, Oct 19, 2009 at 11:20:50PM +0100, Frank Peelo wrote:
Gustavo Enrique Jimenez wrote:
2009/10/18 Tom Verhoeff t.verho...@tue.nl:
A simple example is the situation where one needs to calculate
the replacement resistor value R for parallel resistors having
values R1, R2, ..., Rk
On Sun, Oct 18, 2009 at 02:49:40PM -0200, Jorge Aldo G. de F. Junior wrote:
Wouldnt a NaN (Not a number) be more matematically correct result (I saw
that on an old book about i387)
No, read Kahan's article that I pointed to.
Matematically division by zero is an mathematical impossibility, so
On Mon, Oct 19, 2009 at 10:21:01AM +0200, Jonas Maebe wrote:
On 18 Oct 2009, at 17:52, Tom Verhoeff wrote:
It would be nicer if one had the ability to make floating-point
division
by zero return an IEEE 754 plus/minus infinity, without raising an
exception.
http://www.freepascal.org
On Sat, Oct 17, 2009 at 01:57:28PM +0200, Bart wrote:
Is there a reason why in fpc both floating point and integer division
by zero raise an EDivByZero exception?
See: http://docwiki.embarcadero.com/VCL/en/SysUtils.EZeroDivide
SysUtils.EZeroDivide exception is raised when an application
On Wed, Sep 02, 2009 at 06:20:17PM -0300, Felipe Monteiro de Carvalho wrote:
Is anyone using a profiler in Mac OS X? I am trying to detect if there
are memory leaks.
gprof doesn't seam to work and valgrind doesn't seams usable from
their readme, so I tryed Sampler from the Developers dir,
On Wed, Jul 01, 2009 at 01:15:29PM +0200, Michael Van Canneyt wrote:
On Wed, 1 Jul 2009, Tom Verhoeff wrote:
Zoiets zou ook in de TObject.Create (RTL) doc. van FreePascal passen
(lees: thuishoren).
For non-dutch speakers: It says that this kind of information should
be included in the FPC
On Tue, Jun 30, 2009 at 07:58:47PM +0100, Inoussa OUEDRAOGO wrote:
2009/6/29 Tom Verhoeff t.verho...@tue.nl:
While tracing a nasty bug (?), I discovered the hard way that when
an Assert is done in a constructor, and it fails, then the destructor
(Destroy) is automatically called.
Indeed
to rely on the fact that fields in a class get
initialized in a predefined way, e.g. pointers are set to nil.
Best regards,
Tom Verhoeff
--
program Assert_in_constructor;
{$Mode Delphi}
{$Assertions on}
uses
SysUtils, Classes;
type
PCell = ^ TCell;
TCell = record // singly linked list
On Sun, Dec 07, 2008 at 11:10:19AM +0100, Marc Santhoff wrote:
How could I solve this problem in a better way?
By using SetUp and TearDown routines.
Tom
--
E-MAIL: T.Verhoeff @ TUE.NL | Dept. of Math. Comp. Science
PHONE: +31 40 247 41 25| Technische Universiteit
On Wed, Oct 29, 2008 at 09:58:10PM +0100, Vinzent Höfler wrote:
Tom Verhoeff wrote:
I am surprised that for ShortString, the range is not
also 1 = i = Length(s).
IIRC Turbo Pascal only allowed you to access s[0] when range checking
was off, and similarly for s[i] with i Length(s
Can someone confirm what range checking FreePascal does (if enabled)
when indexing a string. I imagine shortstrings and ansistrings are
handled differently, but cannot find this in the documentation.
It looks like the following:
String Type Range Checked for s[i]
---
On Wed, Sep 10, 2008 at 05:24:06PM +0200, Paul wrote:
No, installed FPC/Lazarus on my iMac, but there are problems with it.
Appearantly, I'm not the only one, I've seen problems with it on the
mac-pascal list too.
On Mac OS X 10.5, I can't start Lazarus (OS-error : You can't start
On Sat, Sep 06, 2008 at 11:28:52PM +0200, Marco van de Voort wrote:
In our previous episode, Florian Klaempfl said:
Would there be any interest in incorporating it?
If it's endian safe and if there are tests, I propose to incoperate it
in math.
The Tostring stuff should go into
On Sat, Sep 06, 2008 at 09:31:02PM +0200, Florian Klaempfl wrote:
What would I need to do to release it under the same license as
other FreePascal libraries?
Post the sources somewhere using the license header we use?
I intend to do just that. I was considering the use of plain GPL,
rather
On Sun, Sep 07, 2008 at 07:53:06AM -0300, Felipe Monteiro de Carvalho wrote:
I would suggest to put this routines in a new unit, to keep the
existing base units small and clean.
How about naming them FloatUtils?
Tom
--
E-MAIL: T.Verhoeff @ TUE.NL | Dept. of Math. Comp. Science
On Sun, Sep 07, 2008 at 12:44:13PM +0200, Marco van de Voort wrote:
Post the sources somewhere using the license header we use?
I made the source available as a Contributed Unit using a modified LGPL.
You can find a zip archive here:
I have an Intel-based MacBook Pro. Until recently, I still used
a PowerPC version of FPC. PowerPC code on this machine runs through
(invisible) emulation.
However, I upgraded now to FPC 2.2.2 for Intel on mac.
And to my surprise one of my time-consuming apps is twice slower,
instead of faster.
I have a created a unit FloatView to help you inspect in detail 32-bit
(Single) and 64-bit (Double) IEEE 754 floating-point values (in case
every bit counts; note that when floating-point numbers are output in
decimal, some information is inevitably lost).
I would like to contribute this unit,
On Tue, Sep 02, 2008 at 10:08:36AM +0100, Jonas Maebe wrote:
On 02 Sep 2008, at 09:05, Paul wrote:
I want to uninstall and reinstall fpc and lazurus.
My current installation is useless.
I found the steps on Wiki, but I used the docs on Wiki to install them
and it totally went wrong.
The
On Sat, Aug 23, 2008 at 12:20:48AM +0200, Tom Verhoeff wrote:
I have an application (for optimizing decisions in the dice game Yahtzee)
that uses Real and runs well with FPC on Mac OS X (PPC), but that
fails with a Floating Point Exception (FPE) under Windows (FPC 2.2.0).
I played around some
I have an application (for optimizing decisions in the dice game Yahtzee)
that uses Real and runs well with FPC on Mac OS X (PPC), but that
fails with a Floating Point Exception (FPE) under Windows (FPC 2.2.0).
What makes things complicated, is that the program has a GUI
through Lazarus, and that
On Sun, Jan 06, 2008 at 02:18:32PM +0100, Vincent Snijders wrote:
One of them is in Dutch called Turbo Pascal in de praktijk and can be
retrieved from SVN: http://svn.freepascal.org/svn/tpidp/trunk/
I cannot find this via ViewCVS. Is tpidp not set as a repository root
on
On Fri, Dec 14, 2007 at 12:28:04PM +0100, Vincent Snijders wrote:
Tom Verhoeff schreef:
We use the HeapTrc facility in our education to get an impression of
memory management issues in programs submitted for assignments.
Typically our Peach.win.tue.nl system runs programs to test
We use the HeapTrc facility in our education to get an impression of
memory management issues in programs submitted for assignments.
Typically our Peach.win.tue.nl system runs programs to test functionality
and robustness (i.e. test for proper precondition checking through Assert)
on small and
On Wed, Dec 05, 2007 at 09:12:00AM +0100, Daniël Mantione wrote:
Op Wed, 5 Dec 2007, schreef Bee:
Is it just me or above methods are indeed not mentioned within fpc's doc
2.2.0? Any texts that are supposed to be a link to above methods is not
formed
as a link.
On Tue, Oct 30, 2007 at 07:36:39PM +0200, Musan Antal wrote:
The discussion about PI reminds me another funny quote:
The primary purpose of the DATA statement is to give names to
constants; instead of referring to pi as 3.141592653589793 at every
appearance, the variable PI can be given that
article on it for secondary educations, that I hope is more
accessible:
Gyula Horvath, Tom Verhoeff.
``Numerical Difficulties in Pre-University Informatics Education
and Competitions'',
Informatics in Education, Vol. 2, Number 1, pp.21-38.
http
On Mon, Oct 29, 2007 at 06:36:11PM +0100, Micha Nelissen wrote:
It's possible to create a type that stores the numerator and
denominator, but then you would need to simplify to extract common
factors on every calculation, otherwise it would quickly run out of
range (Integer or whatever you
Last February, I used my Yahtzee software to do some calculations
for the book Yahtzee Scratch Play (ISBN 1-4027-5091-9)
http://www.amazon.com/exec/obidos/ASIN/1402750919/theinternationscA
This software is written in FreePascal, and I managed to get this
mentioned in the book's Introduction
On Fri, Aug 17, 2007 at 10:47:27PM +0100, Milan Marusinec wrote:
Tom Verhoeff wrote:
Any idea what I messed up?
This is what my command line looks like:
fpc -Fu/Users/wstomv/Download/JEDI-SDLv1.0/SDL/Pas -Fl/usr/X11R6/lib
-XMSDL_main -k-L/sw/lib -k-lSDL -k-framework -kOpenGL -k-framework
I try to compile a little demo program for SDL, but it still fails.
I use fpc 2.0.4 on powerpc Mac OS X with sdl 1.2.7 installed through fink
(also tried it with SDL installed in /Library/Frameworks).
I consulted the wiki http://wiki.freepascal.org/index.php/FPC_and_SDL
and
On Sun, Aug 12, 2007 at 01:00:44AM -0500, JK Smith at Grid-Sky wrote:
Three things needed in FPC:
2) Contract programming. We have to be able to show proof of correctness in
code to prove the business value of FPC. This will be a major theme for the
business side of software development in
On Mon, Jun 18, 2007 at 10:26:06AM -0400, Tom Walsh wrote:
Heh, if you are reading this then you may know what Metaware is?
Unfortunately for you, I have no such experience; never heard of it.
Another interesting feature is a #define statement which is very much
like a C macro:
#define
On Wed, Jun 13, 2007 at 12:27:29AM +0200, Darius Blaszijk wrote:
The link you gave below to the pdf seems to point to a valid file.
Please recheck it.
It is there alright, but you cannot navigate to that file on
www.freepascal.org. You need to know the URL to find the file.
In fact, fpcunit
On Tue, Jun 12, 2007 at 11:16:23PM +0200, Darius Blaszijk wrote:
BTW: JediMath has a 100% pascal implementation for arbitrary length
arithmatic. Checkout JmLargeFloat.
Thanks. But this does not seem to implement arbitrary-precision
integers and rationals (fractions). The GMP does.
I am trying to use the GNU Multi-Precision (GMP) library with
FreePascal under Linux.
I have a Pascal interface for GMP (originally for Kylix; translated
from C header file).
The header file libgmp.pas and my using program testgmp.pas compile fine.
But linking fails. The message is
I know FreePascal includes the fpcunit unit testing framework
(the compiler knows where to find it), but I can't seem to find any
documentation via the regular www.freepascal.org, or the fpc wiki,
or on the lazarus site?
Michael's fpcunit.pdf seems hidden. Google tells me it is here
On Wed, May 23, 2007 at 05:48:32PM +0300, Christos Chryssochoidis wrote:
On 23 Μαϊ 2007, at 3:05 ΜΜ, Tom Verhoeff wrote:
It is not a trick, but has to do with type compatibility issues
(and history, I guess).
I see. If I understand well, Pascal uses some sort of declaration
(Discussion switched from fpc-devel to fpc-pascal, because it might be
of more general interest.)
On Sat, Apr 14, 2007 at 06:56:12PM +0200, Jonas Maebe wrote:
On 13 Apr 2007, at 17:38, Tom Verhoeff wrote:
The order -Sa -Sg- fails to generate assertion checking code, whereas
happy to use vi(m) under
contest conditions.
Perhaps we should ask Tom Verhoeff, he is very involved in the icpc's.
Tom used to be very involved. I had to make a choice, and after the
World Finals in 1999, I decided to focus on the International Olympiad
in Informatics (IOI: for high school
On Tue, Nov 14, 2006 at 11:47:37AM +0100, Jonas Maebe wrote:
I have a quick question: are there (m)any people here who store/load
sets to/from files?
I do not mix sets and files, but I do mix sets and Single/Double
in a record to decompose floating point numbers.
However, I don't see a big
On Sun, Apr 09, 2006 at 10:58:09PM +0200, Giovanni Premuda wrote:
Tom Verhoeff ha scritto:
This makes it much less attractive to release units without source
code. That may be understandable from an open-source perspective,
but in teaching I find it useful or even necessary to provide units
On Thu, Apr 06, 2006 at 11:04:02PM +0200, Jonas Maebe wrote:
On 6 apr 2006, at 22:59, Tom Verhoeff wrote:
This raises the concern that precompiled units become obsolete when
the user of such a unit upgrades the compiler. The compiler
apparently
requires that the System unit
On Fri, Apr 07, 2006 at 10:24:59AM +0200, Peter Vreman wrote:
There is nothing different compared with TP / Delphi. The internal PPU
format is made for speed and contains direct references from one PPU to
another PPU. Incompatible PPUs can therefor never be used together.
I could not find
On Thu, Apr 06, 2006 at 08:18:28AM +0200, Peter Vreman wrote:
Apparently, there is a dependency on the System unit, and incompatibility
between System units can cause a recompile. Any other such dependencies?
Is every separately compiled unit dependent on System? If not, under
what
In a programming course that I teach, some students are using Lazarus+FPC
instead of Delphi. I made available two precompiled units, that is, the
*.ppu and *.o files. However, when the students tried to compile their
programs using these units, the compiler complained that it could not
find the
On Wed, Apr 05, 2006 at 01:27:04PM +0200, Jonas Maebe wrote:
On 5 apr 2006, at 13:22, Tom Verhoeff wrote:
In a programming course that I teach, some students are using
Lazarus+FPC
instead of Delphi. I made available two precompiled units, that
is, the
*.ppu and *.o files. However
On Sun, Feb 05, 2006 at 01:39:25PM +0100, Jonas Maebe wrote:
On 05 Feb 2006, at 13:32, Tom Verhoeff wrote:
Question 2: Any suggestions as to how to make it more platform
independent,
or how to support multiple platforms in an easy way?
The only differences are little/big endian. So
On Sat, Feb 18, 2006 at 09:43:31AM +0100, Tom Verhoeff wrote:
So, here are some pieces of the code, it uses a variant array to
access the bits of the IEEE floating-point numbers in Single and Double:
That should be 'record' insteady of 'array', of course.
Tom
--
E-MAIL: T.Verhoeff
in such a unit?
Question 2: Any suggestions as to how to make it more platform independent,
or how to support multiple platforms in an easy way?
Looking forward to some feedback,
Tom Verhoeff
--
E-MAIL: T.Verhoeff @ TUE.NL | Fac. of Math. Computing Science
PHONE: +31 40 247 41 25
On Sat, Jan 21, 2006 at 07:07:39PM +0100, Olle Raab wrote:
06-01-19 13.05, skrev Jonas Maebe följande:
On 19 jan 2006, at 11:51, L505 wrote:
From the FPC ReadLn sources I was under the impression that the Mac
used #13 for line
feeds and unix used #10 for line feeds, but I've heard
On Mon, Dec 05, 2005 at 10:03:58AM -0500, Tony Pelton wrote:
On 12/5/05, Tom Verhoeff [EMAIL PROTECTED] wrote:
Why do this? Because that way people can use/try FreePascal without
installing anything.
installing really isn't too complicated currently.
download a tarball, expand
hogging. But maybe there are ways to put together a malicious
source file that makes the compiler misbehave ...
4. Whatever else comes to your mind ...
Best regards,
Tom Verhoeff
--
E-MAIL: T.Verhoeff @ TUE.NL | Fac. of Math. Computing Science
PHONE: +31 40 247 41 25
On Mon, Dec 05, 2005 at 04:54:25PM +0100, Michael Van Canneyt wrote:
I would also add the possibility to upload a zip file with some units.
Processing a single unit is not useful for evaluation, and having to
upload all units manually is tedious and error-prone.
That is the intention (as
I am pretty sure that FPC 1.0.10 would give a runtime error when
attempting to read past the end of file.
E.g.
program ReadPastEOF;
var
i: Integer;
begin
readln(i);
writeln(i);
readln(i);
writeln(i);
end.
when offered a file with just one line containing one integer,
would give a
On Thu, Jul 14, 2005 at 10:27:01AM +0200, Peter Vreman wrote:
Tom Verhoeff a écrit :
The point is that there is no stack trace with line numbers on the
(obviously correct) exception, in spite of the option -gl (even when
explicitly using SysUtils).
The problem is that the framepointer
When the following program is compiled with option -gl -Mdelphi
and executed, it results in
An unhandled exception occurred at $ :
EAccessViolation : Access violation
without a stack trace or line numbers. How come? Is that a bug?
(If so, I will submit it as such.)
The
On Thu, Jul 14, 2005 at 01:12:23AM +0200, Marcel Martin wrote:
Tom Verhoeff a écrit :
begin
VMyClass := TMyClass.Create;
//VMyClass.FP := VMyClass.P; { with this assignment, it works }
VMyClass.FP; { this causes an Access Violation }
Of course, at this point FP = nil since you
On Thu, Jun 02, 2005 at 07:48:30PM +0200, Michael Van Canneyt wrote:
Classes is RTL. I will update the web page.
Will you also include Contnrs in the FCL unit overview? It is currently
not mentioned.
It would also be good to include a statement about FCL documentation.
At the moment it
The System Unit provides the Assert procedures. Code generation for
Assert can be activated through a compiler switch or command-line option:
http://www.freepascal.org/docs-html/rtl/system/assert.html
However, if you do leave them in, what is the overhead? In particular,
(1) does
On Wed, Nov 17, 2004 at 06:43:15PM +0100, Kris Herlaar wrote:
So i'd like to know if there are more Mac users on this list who might
be interested in sharing their knowledge with me and each-other. I'd be
delighted to set up a website with the Pascal for Mac OS X topic, at
least if i'm
Recently, I have been caught a couple of times by mistakes in my
programs using Format (from SysUtils). When the format string and
the supplied arguments do not match, Format raises an exception.
This is nice, but unfortunately, only a hexadecimal address is printed
when the exception is not
63 matches
Mail list logo