Consider the following program:
{$mode objfpc}
type
TJam = array of Integer;
TRuang = record
nm_ruang: string;
avl: TJam;
end;
PRuang = ^TRuang;
var
x: array of integer;
TR: TRuang;
PR: PRuang;
begin
try
WriteLn(Length(x));
WriteLn(Length(TR.avl));
PR := GetM
On Sat, 25 Feb 2012 04:23:24 -0800 (PST)
leledumbo wrote:
> Consider the following program:
>
> {$mode objfpc}
> type
> TJam = array of Integer;
>
> TRuang = record
> nm_ruang: string;
> avl: TJam;
> end;
>
> PRuang = ^TRuang;
>
> var
> x: array of integer;
> TR: TRuang;
>
On 25 Feb 2012, at 13:23, leledumbo wrote:
> The code results in AV in the last WriteLn. Is this correct (i.e. intended
> behavior)?
Yes.
> If yes, what is the correct way to have the PR^.avl initialized
> just like TR.avl and x?
Use new(PR) instead of GetMem(SizeOf(TRuang)), or alternatively
> New is GetMem+Initialization.
> Dispose is Finaliziation+FreeMem.
Working GR8, thanks! I didn't know about above equation until just now :p
--
View this message in context:
http://free-pascal-general.1045716.n5.nabble.com/dynamic-array-as-a-part-of-dynamically-allocated-records-behavior-tp55
On 24 February 2012 16:13, Henry Vermaak wrote:
>
> Because case sensitive systems don't create as much confusion.
Here my thoughts are the opposite. While backing up my data no an
external drive with is case insensitive I came across a lot of
possible issues I never realised I had on my case sen
On 24 February 2012 15:57, Mattias Gaertner wrote:
>
> The whole last week I cursed the opposite direction (first windows, then OS
> X).
> It seems it depends on the current task.
:-)
> Linux can handle both. But many Linux tools only support case sensitive
> files.
Well, in a case insensitive
Graeme Geldenhuys schrieb:
> On 24 February 2012 16:13, Henry Vermaak wrote:
>> Because case sensitive systems don't create as much confusion.
> Here my thoughts are the opposite. While backing up my data no an
> external drive with is case insensitive I came across a lot of
> possible issues I ne
Hello,
I found the following amazing lecture that present a new idea of a
development tool, that I think will interest you all:
http://vimeo.com/36579366
Enjoy
Ido
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/
On Sat, 25 Feb 2012 19:15:54 +0100, ik wrote:
I found the following amazing lecture that present a new idea of a
development tool, that I think will interest you all:
http://vimeo.com/36579366
Impressive, indeed. And I am usually not that easily impressed.
Vinzent.
2012/2/26 Vinzent Höfler
> On Sat, 25 Feb 2012 19:15:54 +0100, ik wrote:
>
> I found the following amazing lecture that present a new idea of a
>> development tool, that I think will interest you all:
>>
>> http://vimeo.com/36579366
>>
>
> Impressive, indeed. And I am usually not that easily im
10 matches
Mail list logo