Re: [fpc-pascal] Error when trying to make tests for target AVR

2018-01-06 Thread Christo
On Sun, 2018-01-07 at 05:59 +0200, Christo wrote: > __missing_command_FPCMAKE -p -Tavr-embedded Makefile.fpc Adding fpc_baseinfo to the make command revealed that FPCMAKE was not defined (I guess it should have been obvious from the error message in the first place). I added the path to fpcmake

[fpc-pascal] Error when trying to make tests for target AVR

2018-01-06 Thread Christo
I'm trying to run the test suite for AVR by executing the following make statement: make FPC=~/fpc/3.1.1/compiler/ppcx64 TEST_FPC=~/fpc/3.1.1/compiler/ppcrossavr TEST_CPU_TARGET=avr TEST_OS_TARGET=embedded TEST_SUBARCH=avr5 TEST_OPT="-XPavr-" from the /tests folder. Make terminates with the erro

Re: [fpc-pascal] Final Methods support

2018-01-06 Thread Marcos Douglas B. Santos
On Sat, Jan 6, 2018 at 2:41 PM, Sven Barth via fpc-pascal wrote: > Am 06.01.2018 17:31 schrieb "Marcos Douglas B. Santos" : > > Does FPC have support for final methods? > > Please see -> > http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Methods_(Delphi)#Final_Methods > > > Should be supported si

Re: [fpc-pascal] re-engineering tool

2018-01-06 Thread Marco van de Voort
In our previous episode, Marc Santhoff said: > Since I'm confronted with the task of analyzing a pile of object pascal > sources I'd like to know: > > Is there any tool that can help me? I've used Peganza's pascal analyser in the past, for D7 code. I haven't used it in a while though. _

Re: [fpc-pascal] Final Methods support

2018-01-06 Thread Sven Barth via fpc-pascal
Am 06.01.2018 17:31 schrieb "Marcos Douglas B. Santos" : Does FPC have support for final methods? Please see -> http://docwiki.embarcadero.com/RADStudio/Tokyo/en/ Methods_(Delphi)#Final_Methods Should be supported since 2009, so that would be from at least 2.6.0. Regards, Sven

Re: [fpc-pascal] String message methods and the self parameter

2018-01-06 Thread Sven Barth via fpc-pascal
Am 06.01.2018 17:25 schrieb "Ewald" : Hi, When reading https://www.freepascal.org/docs-html/ref/refsu31.html# x82-1040006.5.7 I stumbled on the following text at the bottom of the page: "In addition to this mechanism, a string message method accepts a self parameter: Procedure StrMsgHandler(Data

[fpc-pascal] Final Methods support

2018-01-06 Thread Marcos Douglas B. Santos
Does FPC have support for final methods? Please see -> http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Methods_(Delphi)#Final_Methods Regards, Marcos Douglas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-b

[fpc-pascal] String message methods and the self parameter

2018-01-06 Thread Ewald
Hi, When reading https://www.freepascal.org/docs-html/ref/refsu31.html#x82-1040006.5.7 I stumbled on the following text at the bottom of the page: "In addition to this mechanism, a string message method accepts a self parameter: Procedure StrMsgHandler(Data: Pointer;

Re: [fpc-pascal] Translate C code

2018-01-06 Thread Sven Barth via fpc-pascal
Am 06.01.2018 12:23 schrieb "Ryan Joseph" : > On Jan 6, 2018, at 5:25 PM, Karoly Balogh (Charlie/SGR) < char...@scenergy.dfmk.hu> wrote: > > So it doesn't crash, because it never loads from this "invalid" address it > calculates. Are we talking about the address on the stack at compile time? If

Re: [fpc-pascal] Translate C code

2018-01-06 Thread Ryan Joseph
> On Jan 6, 2018, at 5:25 PM, Karoly Balogh (Charlie/SGR) > wrote: > > So it doesn't crash, because it never loads from this "invalid" address it > calculates. Are we talking about the address on the stack at compile time? If no memory was ever allocated (which I thought nil suggested) then

Re: [fpc-pascal] Translate C code

2018-01-06 Thread Giuliano Colla
Il 06/01/2018 01:39, Darius Blaszyk ha scritto: #define MEMNEXT(x) ((MyStruct *)(((char *) x) - ((char *) & (((MyStruct *)0)->next h2pas translates it into the enclosed file. Hope that it helps. Giuliano darius.pp Description: application/wine-extension-pp

Re: [fpc-pascal] Translate C code

2018-01-06 Thread Karoly Balogh (Charlie/SGR)
Hi, On Sat, 6 Jan 2018, Ryan Joseph wrote: > Also why does @(PMyStruct(nil)^.next not crash? Dereferencing and taking > the addressing of a nil pointer sounds like a bad idea. Because it doesn't do the actual dereferencing, because next's *VALUE* is never used, only it's address (due to the @ op

[fpc-pascal] re-engineering tool

2018-01-06 Thread Marc Santhoff
Hi! Since I'm confronted with the task of analyzing a pile of object pascal sources I'd like to know: Is there any tool that can help me? Automatically generating a visual class diagram having uses and aggregation of other classes would be very helpful. Any hints? TIA, Marc -- Marc Santhoff

Re: [fpc-pascal] Translate C code

2018-01-06 Thread Ryan Joseph
> On Jan 6, 2018, at 1:49 PM, Karoly Balogh (Charlie/SGR) > wrote: > > type > PMyStruct = ^TMyStruct; > TMyStruct = record >some, fields: integer; >next: PMyStruct; > end; > > function MEMNEXT(x: Pointer): PMyStruct; > begin > MEMNEXT:=PMyStruct(PByte(x)-PByte(@(PMyStruct(nil)^.ne

Re: [fpc-pascal] Translate C code

2018-01-06 Thread Darius Blaszyk
Well, not sure why one needs to do this abomination, without knowing the data structure it operates on, but nevertheless, you can do the same in Free Pascal, but you better turn the macro into a function: Thanks Charlie! ___ fpc-pascal maillist - fp