Am 12.03.2013 21:48 schrieb Sven Barth pascaldra...@googlemail.com:
First and foremost: this is very offtopic, so I'm moving this over to
fpc-other. If someone answers to my mail, then please ensure that you only
answer to fpc-pascal. Thank you.
Of course I meant only answer to fpc-other. I
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
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)
Sorry the array should be dynamic, without [0..100].
2013/3/12 Xiangrong Fang xrf...@gmail.com
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.
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
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
Am 13.03.2013 10:08 schrieb Xiangrong Fang xrf...@gmail.com:
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
Am 13.03.2013 10:08 schrieb Xiangrong Fang xrf...@gmail.com:
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
Am 13.03.2013 10:09 schrieb Xiangrong Fang xrf...@gmail.com:
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
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
On Wed, 13 Mar 2013 09:35:43 +
Howard Page-Clark h...@talktalk.net 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;
2013/3/13 Sven Barth pascaldra...@googlemail.com
Am 13.03.2013 10:08 schrieb Xiangrong Fang xrf...@gmail.com:
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
On 13/03/13 9:50, Mattias Gaertner wrote:
On Wed, 13 Mar 2013 09:35:43 +
Howard Page-Clark h...@talktalk.net 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
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 action:
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
Am 13.03.2013 10:45 schrieb Xiangrong Fang xrf...@gmail.com:
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
Am 13.03.2013 10:53 schrieb Xiangrong Fang xrf...@gmail.com:
2013/3/13 Sven Barth pascaldra...@googlemail.com
Am 13.03.2013 10:08 schrieb Xiangrong Fang xrf...@gmail.com:
2) After SetLength(myarray, 0), is myarray nil or pointing to some
invalid address?
It will be Nil. An equivalent
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 eric...@metropolitancollege.co.za
wrote:
Good day,
Please what is a difference between .pp and .pas files
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 -
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
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
Am 13.03.2013 17:04 schrieb leledumbo leledumbo_c...@yahoo.co.id:
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
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
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
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 ew...@yellowcouch.org
Once upon a time, Xiangrong Fang said:
Is it
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. :-)
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 to
27 matches
Mail list logo