On 24/07/15 04:10, Michael Van Canneyt wrote:
Attributes and RTTI will come as soon as 3.0 are out of the door.
Hello Michael, merging to trunk I presume. Provided that attributes and
new rtti are two of the best things since the discover of the fire and
the wheel, is there some branch I
On 30/07/15 15:05, Sven Barth wrote:
Am 30.07.2015 19:00 schrieb Joao Morais l...@joaomorais.com.br
mailto:l...@joaomorais.com.br:
tbar2 inherits from tbar1 and 'go' is a virtual method. v1.go calls
the tbar2 implementation as expected but tm(m1)() does call tbar1.go.
As expected
On 14/01/15 19:11, Joao Morais wrote:
On 14/01/15 12:40, Pierre Free Pascal wrote:
The corresponding code that stores the message list
generates an internal error if the number of message is more than 255.
So that the two lines
if mesgnb0 then
Comment(V_Error,'Message recordind
On 14/01/15 12:40, Pierre Free Pascal wrote:
Hi all,
from looking at the source code and the commit,
it does appear to be some error..
The corresponding code that stores the message list
generates an internal error if the number of message is more than 255.
So that the two lines
://github.com/jcmoraisjr/jcore/archive/master.zip
- Compile a test package; or
- path/to/fpc/3.0.1/compiler/ppc386 -Ficore -Fucore -Fuopf
-Fupath/to/fpc/3.0.1/rtl/units/TARGET opf/jcoreopfconfig
Please let me know if I did something badly wrong. Thanks!
Joao Morais
the following hack on 2.6.x:
VPos := Pos('$', AClassName);
if VPos 0 then
VTypeName := Copy(AClassName, VPos + 1, Length(AClassName));
...which is broken on 2.7.
Joao Morais
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
Em 23/11/14 15:49, Sven Barth escreveu:
Am 23.11.2014 18:11 schrieb Joao Morais l...@joaomorais.com.br
mailto:l...@joaomorais.com.br:
Hello list, is there a safe way to know the PTypeInfo, or at least
the string literal of the type(s) used to specialize a generic?
No, you can't
Em 12/03/14 08:55, Martin Frb escreveu:
On 12/03/2014 11:27, Joao Morais wrote:
If I compile RTL with -gl -gw, GDB crashes with the following messages:
While executing the command:
TGDBMIDebuggerInstruction: -break-insert +0,
gdb reported:
linespec.c:2445: internal-error: void
Hello list! Are dynamic arrays initialized with nil after the setlength
call? Doc[1] doesn't say a word about that and my tests say yes, they
are initialized with nil. What is the supported behavior?
[1] http://www.freepascal.org/docs-html/ref/refsu18.html#x42-480003.3.1
on Mavericks?
[1] http://www.sourceware.org/ml/gdb/2012-03/msg00055.html
Thanks!
Joao Morais
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Em 28/02/14 03:44, Sven Barth escreveu:
=== code end ===
Currently this will print:
=== output begin ===
Bar
=== output end ===
If the compiler would now naively generate an implementation of
TMyGeneric with TMyType then the result would be:
=== output begin ===
Foo
=== output end ===
Em 27/02/14 09:34, Sven Barth escreveu:
Am 27.02.2014 11:56, schrieb Joao Morais:
Em 27/02/14 05:26, Sven Barth escreveu:
Am 27.02.2014 01:38, schrieb Joao Morais:
Hello list. What is the current status of property attributes? Some
roadmap?
http://wiki.freepascal.org/Property_attributes
Em 09/02/14 18:05, Joao Morais escreveu:
Hello list. I need to list all published properties declared in a
class, iow, removing properties inherited from the parent.
Up to now I am iterating typinfo.GetPropList, starting at:
GetTypeData(PTypeInfo(TheClass.ClassParent.ClassInfo))^.PropCount
Em 27/02/14 05:26, Sven Barth escreveu:
Am 27.02.2014 01:38, schrieb Joao Morais:
Hello list. What is the current status of property attributes? Some
roadmap?
http://wiki.freepascal.org/Property_attributes
There is a branch which already supports class attributes. Property
attributes
Em 25/02/14 05:14, Sven Barth escreveu:
A generic is by definition not a fully existant type.
Plans to include generics as a real type for class attributes? Something
like the Java world:
generic TMyGenericT: TMyType -- this is the real type
specialize TMyGenericTSomeDescendantType --
Em 27/02/14 09:39, Sven Barth escreveu:
Am 27.02.2014 13:37, schrieb Sven Barth:
Am 27.02.2014 12:12, schrieb Joao Morais:
Em 25/02/14 05:14, Sven Barth escreveu:
A generic is by definition not a fully existant type.
Plans to include generics as a real type for class attributes?
Something
Hello list. What is the current status of property attributes? Some roadmap?
http://wiki.freepascal.org/Property_attributes
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Hello list. I need to list all published properties declared in a class,
iow, removing properties inherited from the parent.
Up to now I am iterating typinfo.GetPropList, starting at:
GetTypeData(PTypeInfo(TheClass.ClassParent.ClassInfo))^.PropCount;
and it works (fpc 2.6.2). TheClass will
Hello list. Whenever I add interfaced objects to a
TFPGInterfacedObjectList, those objects apparently add two references,
while release only one when the list is cleaned or destroyed.
The following code shows:
$ /tmp/project1
just before vl.add(v1)..: 1
just after
Em 27/01/14 20:39, Marco van de Voort escreveu:
In our previous episode, Joao Morais said:
Hello list. Whenever I add interfaced objects to a
TFPGInterfacedObjectList, those objects apparently add two references,
while release only one when the list is cleaned or destroyed.
v1 reference
On Sat, Aug 3, 2013 at 9:07 PM, Joao Morais jcmorai...@gmail.com wrote:
$ ./pqconsole
An unhandled exception occurred at $000CA921 :
EInOutError : Can not load PostgreSQL client library libpq.dylib.
Check your installation.
---
What I have done so far:
1. export
-
libpq.5.4.dylib
--
Hints?
Joao Morais
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
On Wed, May 1, 2013 at 6:26 AM, Graeme Geldenhuys
gra...@geldenhuys.co.uk wrote:
In the end I just downloaded the FPC source, and built my own 64-bit
compiler.
Why do you need a 64 bit compiler? (just curious)
___
fpc-pascal maillist -
On Sat, Mar 9, 2013 at 8:33 AM, Jonas Maebe jonas.ma...@elis.ugent.be wrote:
On 09 Mar 2013, at 02:37, Joao Morais wrote:
On Fri, Mar 8, 2013 at 4:09 PM, Flávio Etrusco flavio.etru...@gmail.com
wrote:
[...]
You are suggesting that this unlikely coincidente which causes a
sigsegv should
On Sun, Mar 10, 2013 at 2:49 AM, 印場 乃亜 shir...@galapagossoftware.com wrote:
On 2013/02/26, at 8:51, Joao Morais jcmorai...@gmail.com wrote:
On Mon, Feb 25, 2013 at 8:03 PM, Graeme Geldenhuys
gra...@geldenhuys.co.uk wrote:
I quite like this idea. I have always hated *nix systems that don't
Sorry about breaking the thread.
On Sun, Mar 10, 2013 at 3:47 PM, Joao Morais jcmorai...@gmail.com wrote:
Anyway I'd like to see some fixes in the rtl, not because of
compatibility but because of performance improvement: not declaring
refcounted parameters such as ansi strings and com
. No thanks, I much
more prefer the Delphi compatibility =)
Joao Morais
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
(from two days ago), i386-win32.
Joao Morais
==
program project1;
{$mode objfpc}{$H+}
uses
heaptrc,
sysutils,
Classes;
type
iintf = interface
['{9E08FFD2-5AC4-4AE7-B2C6-703D62A10F16}']
function RefCount: Integer;
end;
{ tintf }
tintf = class(TInterfacedObject
typecast, don't know exactly why,
works flawlessly. Anyway the following code reproduce the exact
problem I have here. The 'sucess!' message isn't called.
Using 2.6.2 and 2.7.1 (2013/03/03)
Joao Morais
=
program project1;
{$mode objfpc}{$H+}
uses
heaptrc,
sysutils,
Classes
On Mon, Mar 4, 2013 at 6:19 AM, Marco van de Voort mar...@stack.nl wrote:
In our previous episode, Joao Morais said:
How ftp://ftp.freepascal.org/pub/fpc/dist/2.6.2/bootstrap
like lists are built? I missed at least i386-linux and i386-win32
binaries.
They are simply the compiler binary
value: integer; virtual; abstract;
public
class function getvalue: integer;
end;
TB = class(TA)
protected
class function value: integer; override;
end;
TC = class(TA)
protected
class function value: integer; override;
end;
Joao Morais
: somecheck(Self, @FClient); Result := FClient;
Is there some compiler magic I am missing?
Joao Morais
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
On Sun, Mar 3, 2013 at 2:16 PM, Sven Barth pascaldra...@googlemail.com wrote:
On 03.03.2013 18:03, Joao Morais wrote:
Is there some compiler magic I am missing?
Nope, you don't miss anything. The only thing which *could* help you is when
the new RTTI unit is implemented which contains
Hello list. How ftp://ftp.freepascal.org/pub/fpc/dist/2.6.2/bootstrap
like lists are built? I missed at least i386-linux and i386-win32
binaries. Just to know how I will update my drafts.
Joao Morais
___
fpc-pascal maillist - fpc-pascal
easier.
find -type f -executable
Btw .bat is also executable. And nothing prevents you from naming your
nix executables with the .exe extension.
Joao Morais
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman
(TBaseModel);
implementation
initialization
FWRegisterClass([TUser, TContact]);
Joao Morais
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
.
Joao Morais
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
. And in fact, it is
what it does use in FPC on platforms that don't support an x87 fpu.
What about promote the consistency between all platforms and implement
currency as a scaled integer? After all, internally, it isn't a
floating point format.
Joao Morais
On Wed, Sep 9, 2009 at 5:08 PM, Jonas Maebe jonas.ma...@elis.ugent.be wrote:
On 09 Sep 2009, at 21:10, Joao Morais wrote:
The following cgi script shows ?? in the browser if cwstring is
declared, and works as expected if the declaration is removed. Is
there something I can change in order
Hello list.
The following cgi script shows ?? in the browser if cwstring is
declared, and works as expected if the declaration is removed. Is
there something I can change in order to work with widestrings,
cwstring and special chars? fixes_2_4 with linux.
Thanks.
Joao Morais
Hello.
The following patch fixes a bug in the TCustomApplication class.
Against fixes_2_2, sorry.
Joao Morais
@@ -411,7 +411,7 @@
end
else // Short Option.
begin
- HaveArg:=(IParamCount) and (Length(ParamStr(I+1))0) and
(ParamStr(I+1
: SafeVar_typ;
--
Joao Morais
Public
constructor create;
destructor destroy; override;
property data:SafeVar_typ read rSafeVar write wSafeVar;
Published
end;
var
SafeVar:TSafeVar;
constructor TSafeVar.create;
Begin
inherited Create;
fillchar(hSafeVar,sizeof
of a keypress.
Thanks
Joao Morais
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
between Extended and Integer types?
How can I overcome this issue?
Using stored instead of default?
--
Joao Morais
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
.
--
Joao Morais
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
have not the same syntax, you need to create two different methods.
--
Joao Morais
end;
If I do a read like this ( after the line SafeVar.data.d:=111;)
Writeln(SafeVar.data.d);
the output is 111
The compiler is
Free Pascal Compiler version 2.2.2 [2008/08/26] for arm
Of course I could create
Johann Glaser wrote:
Hi!
Am Montag, den 04.08.2008, 08:23 -0300 schrieb Joao Morais:
Johann Glaser wrote:
How can I access an inherited inherited method which was overloaded?
You can't, one of them will need to have a different name.
Thanks.
Why is a method hidden, just because it has
:=pKeypressed
Changing to Keypressed := pKeypressed() ?
else Keypressed:=false;
End;
Joao Morais
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
by string fields is automagically freed
(either that or heaptrc is lying[*] when it says my programs aren't
leaking memory)
Yup. Ansi strings, refcounted interfaces and dyn arrays are
automagically freed when declared as class members and you destroy the
instance.
Joao Morais
.
==
Joao Morais
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
) not local
functions (embedded within another function).
Aff... indeed. Sorry. Local procedures and functions are really
unsupported because of stack and local variable issues afaik. Delphi has
this same limitation.
Joao Morais
___
fpc-pascal maillist
David Emerson wrote:
var
// what should this be??
my_func : function (pass_str : ansistring) : boolean;
Declare a new type:
type
tmy_func = function(pass_str: ansistring): boolean;
var
my_func: tmy_func;
Joao Morais
___
fpc
is: ');
Dest.Position := 0;
for i := 0 to Dest.Size - 1 do
IntToHex(Dest.ReadByte, 2);
What about use Compressor intead of Dest?
Joao Morais
WriteLn('');
finally
Compressor.Free;
Dest.Free;
Source.Free;
end;
end.
___
fpc
Joost van der Sluis wrote:
Op woensdag 28-05-2008 om 18:33 uur [tijdzone -0300], schreef Joao
Morais:
the following patch fixes the storage of floating point numbers where
the decimal point isn't a dot.
Two questions: does postgres always request a dot as decimal point?
Yes.
Or is 'str
Hello,
The following patch fixes the reading of a bytea field from a PgSQL
database.
Btw is there someone working on pg's blob storage?
Joao Morais
Index: packages/fcl-db/src/sqldb/postgres/pqconnection.pp
===
--- packages/fcl
Hello,
the following patch fixes the storage of floating point numbers where
the decimal point isn't a dot.
Joao Morais
Index: packages/fcl-db/src/sqldb/postgres/pqconnection.pp
===
--- packages/fcl-db/src/sqldb/postgres
Michael Van Canneyt wrote:
On Sat, 24 May 2008, Joao Morais wrote:
The following patches fixes the lack of sqlscale var when writing decimal and
numeric fields to ib/fb databases. I've used the same approach used to read
such fields, ie, intpower.
I looked at the patch. It looks good.
I
in the QueryInterface method.
Joao Morais
Smth. like this:
IObserver = Interface
procedure Notify( param: TParameter );
end;
TObserver = class
public
procedure Notify( param: TParameter ); virtual; abstract;
end;
Is it legal to use one or the other when e.g. handing over an observer
to a method
[EMAIL PROTECTED] wrote:
Joao Morais wrote:
s := 'hello world';
vsound.speak(s);
speaks using a literal but says randomic words (sometimes says
nothing) using a variable. Is there something that I am missing?
You should use a variable of type WideString:
VAR
S: WideString
Marco van de Voort wrote:
{$mode objfpc}{$H+}
uses
comobj;
var
vsound: olevariant;
s: string;
begin
vsound := createoleobject('SAPI.SpVoice');
writeln('playing using literal');
vsound.speak('hello world');
writeln('ok (press enter)');
readln;
writeln('now playing using
Hello,
the following code:
{$mode objfpc}{$H+}
uses
comobj;
var
vsound: olevariant;
s: string;
begin
vsound := createoleobject('SAPI.SpVoice');
writeln('playing using literal');
vsound.speak('hello world');
writeln('ok (press enter)');
readln;
writeln('now playing using a
Jonas Maebe wrote:
On 29 Apr 2008, at 15:35, Zaka E-Lab wrote:
It's possible to give a default initialization value to a defined type?
No, that is not possible.
Except if your pointer is declared as a member of a class (which is
always assigned to nil by default)
.
--
Joao Morais
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
FPC users. They (Delphi users) are all out of luck with the
cross-platform abilities of FPC, so we have to use what both compilers
support. For Delphi, that would be the 'Windows' unit.
What about use uses Windows under ifndef fpc?
--
Joao Morais
___
fpc
get your point. What about this piece of code:
interface
function foo: tfoo;
implementation
var
_foo: tfoo;
function foo: tfoo;
begin
if not assigned(_foo) then
_foo := tfoo.create;
result := _foo;
end;
Is it safe?
--
Joao Morais
___
fpc
zaher dirkey wrote:
Who is need to return the same source if it empty quoted string?
That force me to implement a new function to use it.
Or use AnsiExtractQuotedStr.
--
Joao Morais
On Sun, Mar 2, 2008 at 2:17 PM, Micha Nelissen [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
Peter
.
--
Joao Morais
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
mode. But it breaks too much existing code. We have to
think about backwards compatibility.
Not a problem IMHO, since one can include objfpc mode within fpc.cfg file.
--
Joao Morais
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http
Joao Morais wrote:
writeln('now testing dynamic array');
setlength(v1, 5);
v2 := copy(v1, 2, 10);
writeln('length is: ', length(v2));
v2 := copy(v1, 6, 10); // -- here
writeln('length is: ', length(v2));
end.
will raise an exception, range check error iirc, trying to copy
Leonardo M. Ramé wrote:
Jonathan,
I never needed such type of feature, a propossed solution is to create one unit
per class, and
declare your constants in the implementation section of each unit.
A class function would be a better approach.
Example:
unit People
interface
type
TPeople
Leonardo M. Ramé wrote:
With your response I assume he meant something like static attributes when he said
class
constants.
Yup. A class variable is another matter, which afaik cannot be reached
with one class per unit approach.
--- Joao Morais [EMAIL PROTECTED] wrote:
A class function
Marco van de Voort wrote:
Does FPC support class constants, and if it doesn't, are there any plans
to add this support?
Have a look at
http://www.freepascal.org/faq.var#extensionselect
The question would be what would make this possible?
What about class vars?
Hello,
I need to send an unknown amount of elements to the Format function
(actually objects within a tlist decendant). I apparently cannot create
a dynamic array of const, is there another way that I am missing?
Currently I am parsing the Fmt param.
Thanks.
--
Joao Morais
private
FList1: TStringList;
FList2: TStringList;
public
property List1: TStringList read FList1;
property List2: TStringList read FList2;
end;
The later, *much* better. You should never use class members outside the
private area.
--
Joao Morais
Damien Gerard wrote:
On Jan 21, 2008, at 2:52 PM, Joao Morais wrote:
Damien Gerard wrote:
I have (it would seem) a stupid question :)
We have TStringList vars. User can do what he want with it.
Which one is the stupid or the better way to do it ?
TMyClass = class(TObject)
public
snip
Matt Emson wrote:
Joao Morais wrote:
Damien Gerard wrote:
On Jan 21, 2008, at 2:52 PM, Joao Morais wrote:
Damien Gerard wrote:
I have (it would seem) a stupid question :)
We have TStringList vars. User can do what he want with it.
Which one is the stupid or the better way to do
have [0] .. [19];
// Length(VArray) = 20
// for I := 0 to Pred(Length(VArray)) is a valid statement
They are reference counted, just like ansi strings, ie don't worry about
memory leakages.
--
Joao Morais
___
fpc-pascal maillist - fpc-pascal
statement
They are reference counted, just like ansi strings, ie don't worry about
memory leakages.
... Of the array itself. The objects it contains is another matter.
Ah, yes, forgot to mention this. I usually use dyn arrays to manage
objects owned by other lists or objects.
--
Joao Morais
Vetor[1]:= 2
Vetor[2]:= 0
Vetor[3]:= 0
I assume the same based on the rtl internals -- except that you cannot
assume values from a newly allocated area (except if you are dealing
with objects)
--
Joao Morais
___
fpc-pascal maillist - fpc
Adrian Maier wrote:
On 10/31/07, Joao Morais [EMAIL PROTECTED] wrote:
Adrian Maier wrote:
On 10/31/07, Matt Emson [EMAIL PROTECTED] wrote:
Adrian Maier wrote:
Hello,
I'm seeking for advice about which is the best way to hold an array of
class instances
I need to access the elements using
Daniël Mantione wrote:
And, as said before, no datastructure is adequate for storing a
mathematical real number. Not even if you have infinite memory.
Nope. If infinite memory was tangible, you would be able to store any
real number.
--
Joao Morais
integer type like Currency.
--
Joao Morais
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
: garbage collection, an
algorithm to detect the island or one weak reference in order to break
the chain.
--
Joao Morais
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
a warning if you instantiate a class with
abstract methods
Only if creating an instance straight from the class, eg:
This will warn:
begin
VMyObj := TMyAbstract.Create;
This wont:
var
VMyClass: TMyAbstractClass;
begin
VMyClass := TMyAbstract;
VMyObj := VMyClass.Create;
--
Joao Morais
fField:anytype;
end;
would make fField visible public?
It would be published.
iirc only if the class or a superclass is declared with $M+
--
Joao Morais
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman
] as TObjectList)[ACol] as TYourTargetClass);
Hth.
--
Joao Morais
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
data type (eg as a class) and include some
flags as IsNull, IsEmpty, etc.
--
Joao Morais
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Joao Morais wrote:
I simply don't know how to register the issue since I can't create a
small sample that reproduce it, but I can send about 1 mb of sources to
a volunteer though.
Was this one forgotten? Let me know how can I help.
--
Joao Morais
Micha Nelissen wrote:
Joao Morais wrote:
The first call that I make to DefaultObj from *another* unit recreate
the object, because, I don't know why, the _holder var points again to nil.
Try to use a data watchpoint to watch when the variable is being
changed. Hopefully that will point
Darius Blaszijk wrote:
I've had similar issues some time ago. Have you tried FPC 2.3.1? It has
a some interface fixes.
Nope. Trunk, rev. 8290 and still broken :-/
Thanks.
--
Joao Morais
Joao Morais wrote:
Hello,
I have the following code:
{$mode objfpc}
interface
...
function
of the problem is gpl code. It fails under 2.0.4 and
current fixes_2_2 branch. Hints?
Thanks.
--
Joao Morais
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
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 procedure variable type
, the compiler complains that:
Error: Incompatible types: got procedure variable type of
function:AnsiString of object;Register expected AnsiString
Current 2.2 fixes branch.
If I remove the at operator, this code compiles under $mode delphi.
What can I do to make it work under objfpc?
Thanks.
--
Joao
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
!
--
Joao Morais
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
a select just before
the update but I will create an useless overhead, since the database
provides this information.
When you say implement it, you don't mean 2.2 I think. If so, would you
have a workaround to point out?
Thanks.
--
Joao Morais
___
fpc
Flávio Etrusco wrote:
There are many Portuguese speakers in the list that certainly will be
glad to help too ;-)
Best regards,
Flávio (from Brazil)
Yup. I have started a thread in the Lazarus mailing list where only
PT-BRs participated. =)
--
Joao Morais
THelloWrapper.Destroy;
begin
FHello.Free;
inherited;
end;
function THelloWrapper.GetHello: THelloWorld;
begin
if not Assigned(FHello) then
FHello := FHelloClass.Create;
Result := FHello;
end;
And so on.
--
Joao Morais
___
fpc-pascal maillist
of Regenerate Makefiles? thread ..
Sent a mail in private with 2 articles.
Hmmm... what about a link?
Thanks.
--
Joao Morais
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
reference, you will have
memory leakage.
--
Joao Morais
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
1 - 100 of 112 matches
Mail list logo