[fpc-pascal] initializing pointer values

2011-12-16 Thread dhkblaszyk
On implementing a linked list I hit to some unexpected (doesn't mean incorrect though) behaviour. ptest = ^test; test = record p: pointer; end; new(mytest); When I allocate mytest the pointer variable p is initialized as $ instead of nil as I did suspect. In my code though I

Re: [fpc-pascal] initializing pointer values

2011-12-16 Thread Michael Van Canneyt
On Fri, 16 Dec 2011, dhkblas...@zeelandnet.nl wrote: On implementing a linked list I hit to some unexpected (doesn't mean incorrect though) behaviour.     ptest = ^test;   test = record     p: pointer;   end;     new(mytest);   When I allocate mytest the pointer variable p is

RE : [fpc-pascal] Distributing unit object files

2011-12-16 Thread Ludo Brands
How do I make FPC not rebuild the unit object file when contributing units to the compiled unit have been modified? What is the best strategy - if at all? If the contributing unit is a stand-alone unit which doesn't depend on other units (fe. a database connector), you can copy the source

Re: [fpc-pascal] initializing pointer values

2011-12-16 Thread dhkblaszyk
On 16 dec '11, Michael Van Canneyt wrote: On Fri, 16 Dec 2011, dhkblas...@zeelandnet.nl [1]wrote: On implementing a linked list I hit to some unexpected (doesn't mean incorrect though) behaviour. ptest = ^test; test = record p: pointer; end; new(mytest); When I allocate mytest the

[fpc-pascal] Testing applications with FPCUnit

2011-12-16 Thread luciano de souza
Hello listers, Navigating in FPC source codes, I found fpcunit. It's really wonderful. With the tTestCase class, we can generate a report with the success or the failure of our tests. However, only observing the source code, it's not easy to comprehend how it works. I found a single parcial

Re: [fpc-pascal] Testing applications with FPCUnit

2011-12-16 Thread Vincent Snijders
2011/12/16 luciano de souza luchya...@gmail.com: Hello listers, Navigating in FPC source codes, I found fpcunit. It's really wonderful. With the tTestCase class, we can  generate a report with the success or the failure of our tests. Is there documentation on the usage of fpcunit? What is

Re: [fpc-pascal] Testing applications with FPCUnit

2011-12-16 Thread Michael Van Canneyt
On Fri, 16 Dec 2011, Vincent Snijders wrote: 2011/12/16 luciano de souza luchya...@gmail.com: Hello listers, Navigating in FPC source codes, I found fpcunit. It's really wonderful. With the tTestCase class, we can  generate a report with the success or the failure of our tests. Is there

[fpc-pascal] JSON Dataset in FCL-DB.

2011-12-16 Thread Michael Van Canneyt
Hello, I just committed a JSON dataset in fcl-db. This is a dataset which stores its data in JSON objects (as in fpjson) in memory. The records are in a JSON array, each record can be a JSON object or array. (not mixed) The dataset is read-write. It can be used to create JSON data from

Re: [fpc-pascal] JSON Dataset in FCL-DB.

2011-12-16 Thread Leonardo M . Ramé
From: Michael Van Canneyt mich...@freepascal.org To: FPC mailing list fpc-pascal@lists.freepascal.org; Lazarus mailing list laza...@lazarus.freepascal.org Sent: Friday, December 16, 2011 1:37 PM Subject: [fpc-pascal] JSON Dataset in FCL-DB. Hello, I just committed a JSON dataset in fcl-db.

Re: [fpc-pascal] JSON Dataset in FCL-DB.

2011-12-16 Thread Michael Van Canneyt
On Fri, 16 Dec 2011, Leonardo M. Ramé wrote: From: Michael Van Canneyt mich...@freepascal.org To: FPC mailing list fpc-pascal@lists.freepascal.org; Lazarus mailing list laza...@lazarus.freepascal.org Sent: Friday, December 16, 2011 1:37 PM Subject: [fpc-pascal] JSON Dataset in FCL-DB.

Re: [fpc-pascal] JSON Dataset in FCL-DB.

2011-12-16 Thread Leonardo M . Ramé
- Original Message - From: Michael Van Canneyt mich...@freepascal.org To: FPC-Pascal users discussions fpc-pascal@lists.freepascal.org Cc: Lazarus mailing list laza...@lazarus.freepascal.org Sent: Friday, December 16, 2011 2:53 PM Subject: Re: [fpc-pascal] JSON Dataset in FCL-DB.

Re: [fpc-pascal] JSON Dataset in FCL-DB.

2011-12-16 Thread Michael Van Canneyt
On Fri, 16 Dec 2011, Leonardo M. Ramé wrote: What is missing currently is the delta to update data on the server, but that should be easily added. Michael. Thanks.  Btw. I've found this dependency related error when I tried to compile. Fixed in revision 19858.

[fpc-pascal] inline and other modifiers

2011-12-16 Thread Bernd
I have the following: unit foo; {$mode objfpc}{$H+} interface uses foobar; function BitCnt(ABitmap: TBitBoard): Integer; implementation {$ifdef cpu386} function BitCnt(ABitmap: TBitBoard): Integer; assembler; register; nostackframe; asm ... end; {$else} function BitCnt(ABitmap:

Re: [fpc-pascal] inline and other modifiers

2011-12-16 Thread Jonas Maebe
On 16 Dec 2011, at 21:36, Bernd wrote: This seems to compile and work as intended, no matter which of the two implementations I choose. But I wonder how this can work? I always thought that what is written in the interface section is authoritative. How can the compiler properly use this unit

Re: [fpc-pascal] Testing applications with FPCUnit

2011-12-16 Thread Luciano de Souza
Perhaps becouse I am not an experienced programer, but the code sounds a little complex. However, the effort will bring large bennefits. Thank you very much for the article. It will help me a lot. Em 16/12/2011 11:44, Michael Van Canneyt escreveu: On Fri, 16 Dec 2011, Vincent Snijders

[fpc-pascal] CPU registers and function calls, unclear explanation in the docs

2011-12-16 Thread Bernd
The programmer's guide says in chapter 6.3 that when using register convention then it does not save any registers. A very old version of this document even said explicitly: The registers are not saved when calling a function or procedure, this sentence is no longer in the programmer's guide but

Re: [fpc-pascal] CPU registers and function calls, unclear explanation in the docs

2011-12-16 Thread Jonas Maebe
On 17 Dec 2011, at 01:46, Bernd wrote: Is there maybe any other document somewhere that describes what *exactly* is expected by the compiler to happen with the registers during a function call or maybe somebody can show me where in the FPC sources I have to look to see for myself what

Re: [fpc-pascal] CPU registers and function calls, unclear explanation in the docs

2011-12-16 Thread Jonas Maebe
On 17 Dec 2011, at 01:59, Jonas Maebe wrote: On 17 Dec 2011, at 01:46, Bernd wrote: Is there maybe any other document somewhere that describes what *exactly* is expected by the compiler to happen with the registers during a function call or maybe somebody can show me where in the FPC

Re: [fpc-pascal] initializing pointer values

2011-12-16 Thread noreply
On Fri, 16 Dec 2011, dhkblas...@zeelandnet.nl wrote: On implementing a linked list I hit to some unexpected (doesn't mean incorrect though) behaviour.     ptest = ^test;   test = record     p: pointer;   end;     new(mytest);   When I allocate mytest the pointer variable pÂ