How can I declare a constant object?
var
MyTest: TObject;
begin
MyTest := TObject.Create;
end.
works (for sure).
How can I declare 'const'?
Thanks
Michael
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mai
On Mon, May 01, 2006 at 12:07:55PM -0600, L505 <[EMAIL PROTECTED]> wrote:
>
> > > Only the pointer itself is the parameter and read-only. Where the pointer
> > > points to is irrelevant.
>
> I remember this from using classes where you can still access the class
> properties -
> should have thou
>
> > did you mean this ? :
> >
> >procedure ChangeRec1(const Rec: TSomeRec);
> >begin
> > Rec.a:= 'string A';
> >end;
> >
> > Because I can't pass a PSomeRec to that function, only a TSomeRec
>
> Then pass a PSomeRec^ to it if you don't intend to change the pointer
> anyway.
On 01 May 2006, at 20:07, L505 wrote:
did you mean this ? :
procedure ChangeRec1(const Rec: TSomeRec);
begin
Rec.a:= 'string A';
end;
Because I can't pass a PSomeRec to that function, only a TSomeRec
Then pass a PSomeRec^ to it if you don't intend to change the pointer
anywa
> > Only the pointer itself is the parameter and read-only. Where the pointer
> > points to is irrelevant.
I remember this from using classes where you can still access the class
properties -
should have thought about that before posing the question :).
>
> But in this case I'm wondering why yo
> I tried to compile gtk2 for arm linux.
> I download the package/extra/gtk2 source from svn server and I use the
> following command to compile it:
>
> make OS_TARGET="linux" CPU_TARGET="arm" FPCCPUOPT="O2" PP="ppcarm"
> COMPILER_OPTIONS="-CX -XX -Xs"
>
> With the original source (GTK2_2), it
Hello, all
I tried to compile gtk2 for arm linux.
I download the package/extra/gtk2 source from svn server and I use the
following command to compile it:
make OS_TARGET="linux" CPU_TARGET="arm" FPCCPUOPT="O2" PP="ppcarm"
COMPILER_OPTIONS="-CX -XX -Xs"
With the original source (GTK2_2), it c
On 01 May 2006, at 08:11, Michael Müller wrote:
- 'const': gives pointer, content read-only
The compiler can handle const parameters in any way it wants, and it
may even differ among different cpu's and calling conventions.
Sometimes they are passed by value, sometimes by reference. It