[fpc-devel] procedure Types

2006-03-04 Thread Amir Aavani
I have problem with procedure Types. Look at the following code: TProcedure= procedure (S: String); TTest= class MyF: TProcedure; procedure F1 (S: String); procedure F2 (S: String); ... end; TTest.constructor ; begin MyF:= @F1; end; it says it can't cast Procedure

Re: [fpc-devel] procedure Types

2006-03-04 Thread Christian Iversen
On Saturday 04 March 2006 10:09, Amir Aavani wrote: I have problem with procedure Types. Look at the following code: TProcedure= procedure (S: String); TTest= class MyF: TProcedure; procedure F1 (S: String); procedure F2 (S: String); ... end;

Re: [fpc-devel] procedure Types

2006-03-04 Thread Michael Van Canneyt
On Sat, 4 Mar 2006, Amir Aavani wrote: I have problem with procedure Types. Look at the following code: TProcedure= procedure (S: String); TTest= class MyF: TProcedure; procedure F1 (S: String); procedure F2 (S: String); ... end; TTest.constructor ; begin MyF:= @F1;

[fpc-devel] libp***.a

2006-03-04 Thread Rod
what are the libp***.a files for? ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] libp***.a

2006-03-04 Thread Michael Van Canneyt
On Thu, 2 Mar 2006, Rod wrote: what are the libp***.a files for? These are units compiled with smartlinking. If you use the smartlinking feature, then the .a files are used instead of the .o files. Takes longer to link, but the resulting binaries are smaller. Michael.

Re: [fpc-devel] libp***.a

2006-03-04 Thread Marco van de Voort
what are the libp***.a files for? Now: smartlinking. In the future: gone, or changed to they original meaning, static lib (like .lib with VC). (An .a is an archive of .o's) See also buildfaq (I hope it is more verbosely in there somewhere): http://www.stack.nl/~marcov/buildfaq.pdf

Re: [fpc-devel] procedure Types

2006-03-04 Thread Amir Aavani
Thanks to Michael and Christian. It works correctly. I think it could be usefull to put an example for this case in fpc docs. Michael Van Canneyt wrote: On Sat, 4 Mar 2006, Amir Aavani wrote: I have problem with procedure Types. Look at the following code: TProcedure= procedure (S:

[fpc-devel] Type definition

2006-03-04 Thread Paul Davidson
If there compelling reason why type definitions cannot be included in class/object definitions? Make it mode FPC to keep folks happy :) Quite often a type is defined in INTERFACE part, but only used within class/object defined in same unit. 1) This means that type is public. This is not

Re: [fpc-devel] Type definition

2006-03-04 Thread Ales Katona
Paul Davidson wrote: If there compelling reason why type definitions cannot be included in class/object definitions? Make it mode FPC to keep folks happy :) Quite often a type is defined in INTERFACE part, but only used within class/object defined in same unit. 1) This means that type is

Re: [fpc-devel] Type definition

2006-03-04 Thread Micha Nelissen
On Sat, 4 Mar 2006 10:24:14 -0500 Paul Davidson [EMAIL PROTECTED] wrote: Quite often a type is defined in INTERFACE part, but only used within class/object defined in same unit. 1) This means that type is public. This is not always good thing in OOese. 2) Unit must be specified in

Re: [fpc-devel] Type definition

2006-03-04 Thread Paul Davidson
unit aUnit; interface type aType = ( at_First, at_aaa, at_bbb, at_Last ); aObj = class aVar : aType unit bUnit; interface uses aUnit; type bObj = class( aObj ) unit cUnit interface uses

[fpc-devel] fcl/image/fpwritexpm fix

2006-03-04 Thread Colin Western
The attached patch fixes two crashes I had with TFPWriterXPM: 1. If there was more than 60 or so colours in the palette 2. If the TFPCustomImage did not have a palette. Colin diff -uNr trunk/fpcsrc/fcl/image/fpwritexpm.pp trunk.w/fpcsrc/fcl/image/fpwritexpm.pp ---

Re: [fpc-devel] Type definition

2006-03-04 Thread Peter Vreman
If there compelling reason why type definitions cannot be included in class/object definitions? Make it mode FPC to keep folks happy :) Quite often a type is defined in INTERFACE part, but only used within class/object defined in same unit. 1) This means that type is public. This is not

Re: [fpc-devel] Type definition

2006-03-04 Thread Michael Van Canneyt
On Sat, 4 Mar 2006, Peter Vreman wrote: If there compelling reason why type definitions cannot be included in class/object definitions? Make it mode FPC to keep folks happy :) Quite often a type is defined in INTERFACE part, but only used within class/object defined in same unit.

[fpc-devel] FExpand function

2006-03-04 Thread Joao Morais
Hello, Should this comparison (!) be fixed? Seeing that this code is going to be changed, what about change Pa[I] assignment from a variable to a constant? rtl/inc/fexpand.inc (* Allow both '/' and '\' as directory separators *) (* by converting all to the native one. *)

Re: [fpc-devel] FExpand function

2006-03-04 Thread Michael Van Canneyt
On Sat, 4 Mar 2006, Joao Morais wrote: Hello, Should this comparison (!) be fixed? Seeing that this code is going to be changed, what about change Pa[I] assignment from a variable to a constant? The comparison can be fixed. In fact I think the code can be reduced to a single loop: if

Re: [fpc-devel] Type definition

2006-03-04 Thread Micha Nelissen
On Sat, 4 Mar 2006 12:57:41 -0500 Paul Davidson [EMAIL PROTECTED] wrote: unit cUnit interface uses bUnit; type cObj = class( bObj ) implementation aVar := at_Last; --- ERROR! The implementation of cUnit requires a USE aUnit; in order to compile