Re: [fpc-pascal] Trouble integrating examples into fpcdoc

2021-04-04 Thread Michael Van Canneyt via fpc-pascal
On Mon, 5 Apr 2021, Noel Duffy via fpc-pascal wrote: In the fpcdocs subversion project, there are a number of example directories each containing one or more small programs and a Makefile. My question is, is that Makefile automatically generated, or is it hand-crafted? It is hand-crafted.

[fpc-pascal] Trouble integrating examples into fpcdoc

2021-04-04 Thread Noel Duffy via fpc-pascal
In the fpcdocs subversion project, there are a number of example directories each containing one or more small programs and a Makefile. My question is, is that Makefile automatically generated, or is it hand-crafted? I'm writing documentation for the netdb module and want to add some example

Re: [fpc-pascal] Usage of FieldAddress

2021-04-04 Thread Ryan Joseph via fpc-pascal
> On Apr 4, 2021, at 2:36 PM, Sven Barth via fpc-pascal > wrote: > > The RTTI streaming relies on *published properties* (and published methods > for the event handlers). Sorry Sven, I'm not understand what I'm doing wrong. From original example "scale" is a published property right? So Fie

Re: [fpc-pascal] Usage of FieldAddress

2021-04-04 Thread Sven Barth via fpc-pascal
Am 04.04.2021 um 22:19 schrieb Ryan Joseph via fpc-pascal: On Apr 4, 2021, at 1:07 PM, Sven Barth via fpc-pascal wrote: Only classes or interfaces are supported as published *fields*. And the visibility of the *property* does not change the visibility of the *field*, after all the property

Re: [fpc-pascal] Usage of FieldAddress

2021-04-04 Thread Ryan Joseph via fpc-pascal
> On Apr 4, 2021, at 1:07 PM, Sven Barth via fpc-pascal > wrote: > > Only classes or interfaces are supported as published *fields*. > > And the visibility of the *property* does not change the visibility of the > *field*, after all the property could be provided by a method. > I know FPC

Re: [fpc-pascal] Usage of FieldAddress

2021-04-04 Thread Sven Barth via fpc-pascal
Am 04.04.2021 um 20:15 schrieb Ryan Joseph via fpc-pascal: On Apr 4, 2021, at 12:10 PM, Sven Barth via fpc-pascal wrote: FieldAddress only works on published fields. Just like MethodAddress only works on published methods. For private fields extended RTTI is required which is not yet imple

Re: [fpc-pascal] Usage of FieldAddress

2021-04-04 Thread Ryan Joseph via fpc-pascal
> On Apr 4, 2021, at 12:10 PM, Sven Barth via fpc-pascal > wrote: > > FieldAddress only works on published fields. Just like MethodAddress only > works on published methods. > > For private fields extended RTTI is required which is not yet implemented. I don't understand this at all I guess

Re: [fpc-pascal] Usage of FieldAddress

2021-04-04 Thread Sven Barth via fpc-pascal
Am 04.04.2021 um 19:12 schrieb Ryan Joseph via fpc-pascal: I'm trying to see fields by name but TObject.FieldAddress doesn't seem to be working. Do I have that correct I should be using FieldAddress to return the pointer of the published property? Some how I can't seem to find an example of Fi

[fpc-pascal] Usage of FieldAddress

2021-04-04 Thread Ryan Joseph via fpc-pascal
I'm trying to see fields by name but TObject.FieldAddress doesn't seem to be working. Do I have that correct I should be using FieldAddress to return the pointer of the published property? Some how I can't seem to find an example of FieldAddress on Google type TSomething = class(TPersiste

Re: [fpc-pascal] Pascal Ardiono (avr) library

2021-04-04 Thread Florian Klämpfl via fpc-pascal
>>> >>> And then, afterwards, once code has been generated for the whole 'block', >>> the register-allocator fills in the registers. And store/restores them when >>> needed. This can be done using an algorithm that uses a tree to 'peel-down' >>> (is this English?) all the solutions. Just like i

Re: [fpc-pascal] Pascal Ardiono (avr) library

2021-04-04 Thread Joost van der Sluis via fpc-pascal
Op 04-04-2021 om 15:43 schreef Florian Klämpfl via fpc-pascal: Am 04.04.2021 um 15:36 schrieb Joost van der Sluis via fpc-pascal : Op 04-04-2021 om 13:33 schreef Florian Klämpfl via fpc-pascal: Am 04.04.2021 um 12:50 schrieb Joost van der Sluis via fpc-pascal : Isn't it at least a goo

Re: [fpc-pascal] Formatting Question

2021-04-04 Thread James Richters via fpc-pascal
0.5 2.53 12.5 Thanks! That’s exactly that I was looking for. Thank you for sharing your code! James ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Pascal Ardiono (avr) library

2021-04-04 Thread Florian Klämpfl via fpc-pascal
> Am 04.04.2021 um 15:36 schrieb Joost van der Sluis via fpc-pascal > : > > > > Op 04-04-2021 om 13:33 schreef Florian Klämpfl via fpc-pascal: >>> Am 04.04.2021 um 12:50 schrieb Joost van der Sluis via fpc-pascal >>> : >>> >>> Isn't it at least a good practice to store self at Y. So we have

Re: [fpc-pascal] Pascal Ardiono (avr) library

2021-04-04 Thread Joost van der Sluis via fpc-pascal
Op 04-04-2021 om 13:33 schreef Florian Klämpfl via fpc-pascal: Am 04.04.2021 um 12:50 schrieb Joost van der Sluis via fpc-pascal : Isn't it at least a good practice to store self at Y. So we have Z free for other calculations and can access members directly using ldd (),y+(). But maybe t

Re: [fpc-pascal] Formatting Question

2021-04-04 Thread James Richters via fpc-pascal
That looks almost perfect.. can I suppress the trailing zeros with the format command without losing the alignment? James Richters www.productionautomation.net ja...@productionautomation.net

Re: [fpc-pascal] Pascal Ardiono (avr) library

2021-04-04 Thread Florian Klämpfl via fpc-pascal
> Am 04.04.2021 um 12:50 schrieb Joost van der Sluis via fpc-pascal > : > > Isn't it at least a good practice to store self at Y. So we have Z free for > other calculations and can access members directly using ldd (),y+(). > > But maybe that's difficult? Using Y might be indeed difficult as

Re: [fpc-pascal] Pascal Ardiono (avr) library

2021-04-04 Thread Joost van der Sluis via fpc-pascal
Op 04-04-2021 om 12:50 schreef Joost van der Sluis via fpc-pascal: I came across some issues while doing this, but I can not remember all of them. Another one: (Also constant propagation) -O4, {$WRITEABLECONST OFF} # [19] a := DigitalPinToBitMask[5]; lds r18,(TC_sARDUINO_ss_DIGITA

Re: [fpc-pascal] Pascal Ardiono (avr) library

2021-04-04 Thread Jonas Maebe via fpc-pascal
On 04/04/2021 12:50, Joost van der Sluis via fpc-pascal wrote: > One thing is constant-propagation in combination with auto-inlining. It > would be really nice when calling PinMode with two constant parameters, > would only lead to setting the constant value at two memory locations. > (Between avr_

Re: [fpc-pascal] Pascal Ardiono (avr) library

2021-04-04 Thread Joost van der Sluis via fpc-pascal
Op 03-04-2021 om 20:42 schreef Florian Klämpfl via fpc-pascal: Am 03.04.2021 um 19:49 schrieb Joost van der Sluis via fpc-pascal : Hi all, During some spare free time I've ported parts of the Arduino AVR library to Free Pascal. So now it is possible to use things like 'DigitalWrite' and

Re: [fpc-pascal] Formatting Question

2021-04-04 Thread Jean SUZINEAU via fpc-pascal
Le 04/04/2021 à 02:41, James Richters a écrit : That looks almost perfect.. can I suppress the trailing zeros with the format command without losing the alignment? As far as I know, no ... Not  with just the RTL. Anyway I have personal code for this, you can extract and customize it to yours