Am 14.03.2013 02:54 schrieb "Xiangrong Fang" :
>
> Is there a "complete" list of reference counted variables in FP? e.g.
dynamic arrays are ref-counted. but are variables allocated by New()
ref-counted?
Dynamic arrays
AnsiString
UnicodeString (and on non Windows also WideString)
COM style interfa
Is there a "complete" list of reference counted variables in FP? e.g.
dynamic arrays are ref-counted. but are variables allocated by New()
ref-counted?
My use case is:
type
PMyRecord = ^TMyRecord;
p: = New(PMyRecord);
MyListView.Item[0].Data = p;
MyListView.Item[0].Delete; <-- Do I need t
I vote for Traits. This will make FP more flexible... As a matter of
fact, I was surprised to see operator overloading being implemented in
pascal, which was a feature I like in C++, although I have never write a
program more complex than cout << "Hello World" in that magnificent
language. :-)
2
The document said it is "deprecated"? Also, I want this to be cross
platform, not for unix only. The use case is:
try
buf := GetMemory(1024);
size := 10240;
stream.Read(buf^, size);
except
??
end;
2013/3/14 Ewald
> Once upon a time, Xiangrong Fang said:
> > Is it possible to use try...
Once upon a time, Xiangrong Fang said:
> Is it possible to use try...except to catch SIGSEGV?
I don't know if it is possible, but how about using fpSignal()? See
http://www.freepascal.org/docs-html/rtl/baseunix/fpsignal.html
--
Ewald
___
fpc-pascal mai
Is it possible to use try...except to catch SIGSEGV?
Thanks!
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Am 13.03.2013 17:04 schrieb "leledumbo" :
>
> That would change the class model to prototyping (as in Lua, JavaScript,
> etc.), which is not how it's implemented in Object Pascal...
I would more call it "Traits" which is at least a feature I'd like to
research. This means that I'll implement it in
On 2013-02-25 05:34, Eric Kom wrote:
>
> Please what is a difference between .pp and .pas files extension?
>
And what is interesting, is that FP Text IDE (which looks like Turbo
Pascal IDE) defaults to the .pas extension when creating new units. You
would think being so closely related to Free
On 2013-03-11 17:32, Graeme Geldenhuys wrote:
>
> Anyway, every now and again my projects (a few of them) fail to link as
> follows
Problem solved!
I had a program unit named m2compiler.lpr, and in another directory I
had a unit named M2Compiler.pas. This caused the conflict at linking.
Simply c
That would change the class model to prototyping (as in Lua, JavaScript,
etc.), which is not how it's implemented in Object Pascal...
--
View this message in context:
http://free-pascal-general.1045716.n5.nabble.com/Selective-Class-Helper-tp5713531p5713545.html
Sent from the Free Pascal - Gener
I am using "pas" for units that Delphi compatible you can compile it with
Delphi, now "pp" it is only FPC compiled not compatible with Delphi.
On Mon, Feb 25, 2013 at 7:34 AM, Eric Kom wrote:
> Good day,
>
> Please what is a difference between .pp and .pas files extension?
>
> --
> Kind Regards
Am 13.03.2013 10:53 schrieb "Xiangrong Fang" :
>
> 2013/3/13 Sven Barth
>>
>> Am 13.03.2013 10:08 schrieb "Xiangrong Fang" :
>> > 2) After SetLength(myarray, 0), is myarray nil or pointing to some
invalid address?
>>
>> It will be Nil. An equivalent alternative would be:
>>
>> MyArray := Nil;
>
>
Am 13.03.2013 10:45 schrieb "Xiangrong Fang" :
>>
>> Yes, in that case it will be Nil (Note: in the static case the elements
of the array would be 0).
>
>
> So, it is even OK to use SetLength() on static arrays? interesting.
No, I meant that the content of a static array will be initialized to zer
Sorry of this cross posts but i wasn't sure where to send this question to.
I am currently using a LPC 1343 Microprocessor board and i have recently
purchased a ULINK2 debugging kit from china.
i am aware that there are plans to allow debugging these boards using the
UNLINK2, but it wasnt som
On 25-2-2013 13:38, Michael Van Canneyt wrote:
> On Mon, 25 Feb 2013, Reinier Olislagers wrote:
> As soon as the path has more than 1 component, it is assumed that the
> path is composed of
> /module/action/whatever.
> If - and only if - there is only 1 path component, it is assumed to be
> an acti
On 13/03/13 9:50, Mattias Gaertner wrote:
On Wed, 13 Mar 2013 09:35:43 +
Howard Page-Clark wrote:
On 12/03/13 8:30, Xiangrong Fang wrote:
TMyClass = class
myarray: array[0..100] of Integer;
end;
You could answer such questions yourself:
Not with this simple test.
[...]
my:
2013/3/13 Sven Barth
> Am 13.03.2013 10:08 schrieb "Xiangrong Fang" :
> > 2) After SetLength(myarray, 0), is myarray nil or pointing to some
> invalid address?
>
> It will be Nil. An equivalent alternative would be:
>
> MyArray := Nil;
>
Sorry, I didn't see this reply just now... You mean, by
On Wed, 13 Mar 2013 09:35:43 +
Howard Page-Clark wrote:
> On 12/03/13 8:30, Xiangrong Fang wrote:
> > TMyClass = class
> > myarray: array[0..100] of Integer;
> > end;
> You could answer such questions yourself:
Not with this simple test.
>[...]
>my:=TMyClass.Create;
>try
>
>
> Yes, in that case it will be Nil (Note: in the static case the elements of
> the array would be 0).
>
So, it is even OK to use SetLength() on static arrays? interesting.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepas
Am 13.03.2013 10:09 schrieb "Xiangrong Fang" :
>
> Hi There,
>
> Is it possible for class helpers to be "selective"? i.e. attach to a
specific object of that class, but not every instance? This would be
useful for "behavior injection".
No, this is not possible.
Regards,
Sven
__
Am 13.03.2013 10:08 schrieb "Xiangrong Fang" :
> 2) After SetLength(myarray, 0), is myarray nil or pointing to some
invalid address?
It will be Nil. An equivalent alternative would be:
MyArray := Nil;
Regards,
Sven
___
fpc-pascal maillist - fpc-pasca
Am 13.03.2013 10:08 schrieb "Xiangrong Fang" :
>
> Sorry the array should be dynamic, without [0..100].
>
>
Yes, in that case it will be Nil (Note: in the static case the elements of
the array would be 0).
Regards,
Sven
___
fpc-pascal maillist - fpc-p
On 12/03/13 8:30, Xiangrong Fang wrote:
TMyClass = class
myarray: array[0..100] of Integer;
end;
You could answer such questions yourself:
program Project1;
{$mode objfpc}
type
TMyClass = class
myarray: array of Integer;
end;
var my:TMyClass;
begin
my:=TMyClass.Create;
try
wri
Hi There,
Is it possible for class helpers to be "selective"? i.e. attach to a
specific object of that class, but not every instance? This would be
useful for "behavior injection".
Thanks
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
ht
Sorry the array should be dynamic, without [0..100].
2013/3/12 Xiangrong Fang
> Hi All,
>
> I have two simple questions:
>
> 1) As far as I know class variables in FPC are automatic initialize to the
> NULL value (e.g. 0 or "" or whatever), does that include dynamic arrays?
> e.g.
>
> TMyClass =
Hi All,
I have two simple questions:
1) As far as I know class variables in FPC are automatic initialize to the
NULL value (e.g. 0 or "" or whatever), does that include dynamic arrays?
e.g.
TMyClass = class
myarray: array[0..100] of Integer;
end;
will myarray be initialized to nil?
2) Aft
Hi,
I'm using FPC 2.7.1 under 64-bit FreeBSD 9.1. I have to use 2.7.1
(updated about a week ago), so I could get the fixes for threading and
memory corruption under FreeBSD (disussed a while back on mailing list).
Anyway, every now and again my projects (a few of them) fail to link as
follows
--
27 matches
Mail list logo