[fpc-pascal] dynamic array as a part of dynamically allocated records behavior

2012-02-25 Thread leledumbo
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

Re: [fpc-pascal] dynamic array as a part of dynamically allocated records behavior

2012-02-25 Thread Mattias Gaertner
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; >

Re: [fpc-pascal] dynamic array as a part of dynamically allocated records behavior

2012-02-25 Thread Jonas Maebe
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

[fpc-pascal] Re: dynamic array as a part of dynamically allocated records behavior

2012-02-25 Thread leledumbo
> 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

Re: [fpc-pascal] FPC with case insensitive file system under Linux

2012-02-25 Thread Graeme Geldenhuys
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

Re: [fpc-pascal] FPC with case insensitive file system under Linux

2012-02-25 Thread Graeme Geldenhuys
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

Re: [fpc-pascal] FPC with case insensitive file system under Linux

2012-02-25 Thread Jürgen Hestermann
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

[fpc-pascal] OT: Amazing new development tools

2012-02-25 Thread ik
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/

Re: [fpc-pascal] OT: Amazing new development tools

2012-02-25 Thread 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 impressed. Vinzent.

Re: [fpc-pascal] OT: Amazing new development tools

2012-02-25 Thread Juha Manninen
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