Re: [fpc-pascal] Assigning a result of a method reference

2007-06-24 Thread Joao Morais
Michael Van Canneyt wrote: On Sat, 23 Jun 2007, Joao Morais wrote: Michael Van Canneyt wrote: On Sat, 23 Jun 2007, Joao Morais wrote: Result := vmetadatamethod; end; the last assignment doesn't compile, the compiler complains that: Error: Incompatible types: got "" expected "AnsiString"

Re: [fpc-pascal] Assigning a result of a method reference

2007-06-23 Thread Michael Van Canneyt
On Sat, 23 Jun 2007, Joao Morais wrote: > Michael Van Canneyt wrote: > > > > On Sat, 23 Jun 2007, Joao Morais wrote: > > > > > Hello, > > > > > > Taking the following code: > > > > > > {$mode objfpc}{$h+} > > > class function tfoo.classmetadata: string; > > > var > > > vmetadatamethod: funct

Re: [fpc-pascal] Assigning a result of a method reference

2007-06-23 Thread Joao Morais
Michael Van Canneyt wrote: On Sat, 23 Jun 2007, Joao Morais wrote: Hello, Taking the following code: {$mode objfpc}{$h+} class function tfoo.classmetadata: string; var vmetadatamethod: function: string of object; begin vmetadatamethod := @internalmetadatastr; // more code Result := v

Re: [fpc-pascal] Assigning a result of a method reference

2007-06-23 Thread Michael Van Canneyt
On Sat, 23 Jun 2007, Joao Morais wrote: > > Hello, > > Taking the following code: > > {$mode objfpc}{$h+} > class function tfoo.classmetadata: string; > var > vmetadatamethod: function: string of object; > begin > vmetadatamethod := @internalmetadatastr; > // more code > Result := vme

[fpc-pascal] Assigning a result of a method reference

2007-06-23 Thread Joao Morais
Hello, Taking the following code: {$mode objfpc}{$h+} class function tfoo.classmetadata: string; var vmetadatamethod: function: string of object; begin vmetadatamethod := @internalmetadatastr; // more code Result := vmetadatamethod; end; the last assignment doesn't compile, the compile