Re: [fpc-devel] *** GMX Spamverdacht *** An extension of fpc language: the BASED construct

2017-12-26 Thread Giuliano Colla
Il 26/12/2017 18:43, Karoly Balogh (Charlie/SGR) ha scritto: As far as I understand (I did not try) this was once supported, but explicitly removed by FPC 2.4.0 from Absolute keyword dereferencing is no longer allowed:

Re: [fpc-devel] An extension of fpc language: the BASED construct

2017-12-26 Thread Giuliano Colla
Il 26/12/2017 18:26, Sven Barth via fpc-devel ha scritto: Am 26.12.2017 13:33 schrieb "Giuliano Colla" >: If the idea is not rejected, then a number of refinements (which I'm ready to implement) are required to make

Re: [fpc-devel] *** GMX Spamverdacht *** An extension of fpc language: the BASED construct

2017-12-26 Thread Giuliano Colla
Il 26/12/2017 18:43, Karoly Balogh (Charlie/SGR) ha scritto: HI, On Tue, 26 Dec 2017, Thorsten Engler wrote: Item: BYTE BASED ItemPtr; Ignoring any other considerations for now, I would have at least used a logical extension derived from already supported syntax: Item: Byte absolute

Re: [fpc-devel] An extension of fpc language: the BASED construct

2017-12-26 Thread Giuliano Colla
Il 26/12/2017 14:27, Mark Morgan Lloyd ha scritto: What does gdb (and possibly other debuggers) make of this? What currently gdb tells (and any other debugger would tell) is : No symbol "Item" in current context. Once the appropriate entries are implemented in the debugger symbol table, it

Re: [fpc-devel] An extension of fpc language: the BASED construct

2017-12-26 Thread Thorsten Engler
In that case, if the functionality is going to be included, the best course of action might be to restore pre 2.4.0 behaviour, add the ability to use explicit dereference, and bind it to a separate mode switch. Binding it to a mode switch solves the Delphi compatibility reason for removing it.

Re: [fpc-devel] *** GMX Spamverdacht *** An extension of fpc language: the BASED construct

2017-12-26 Thread Karoly Balogh (Charlie/SGR)
HI, On Tue, 26 Dec 2017, Thorsten Engler wrote: > > Item: BYTE BASED ItemPtr; > > Ignoring any other considerations for now, I would have at least used a > logical extension derived from already supported syntax: > > Item: Byte absolute ItemPtr^; As far as I understand (I did not try) this was

Re: [fpc-devel] An extension of fpc language: the BASED construct

2017-12-26 Thread Sven Barth via fpc-devel
Am 26.12.2017 13:33 schrieb "Giuliano Colla" : If the idea is not rejected, then a number of refinements (which I'm ready to implement) are required to make the feature generally available: My following remarks are independent of an eventual acceptance of the

Re: [fpc-devel] *** GMX Spamverdacht *** An extension of fpc language: the BASED construct

2017-12-26 Thread Sven Barth via fpc-devel
Am 26.12.2017 14:44 schrieb "Thorsten Engler" : > Item: BYTE BASED ItemPtr; Ignoring any other considerations for now, I would have at least used a logical extension derived from already supported syntax: Item: Byte absolute ItemPtr^; I agree, as it avoids adding a

Re: [fpc-devel] An extension of fpc language: the BASED construct

2017-12-26 Thread Ozz Nixon
See: http://tutorial.modernpascal.com/?DataTypes I implemented INTEGER as 32bit, but, if FPC makes it 16bit only, I will go make the change right now. My end-users all know *DO NOT USE INTEGER* it's even in the license agreement. "It is only there for make code compatible w/ Delphi and FPC." I am

Re: [fpc-devel] An extension of fpc language: the BASED construct

2017-12-26 Thread Ozz Nixon
I like the concept, I would like to ask that we do not support INTEGER as a type, and be more specific by limiting to SHORTINT, SMALLINT, LONGINT, INT64. That way code snippets are not confusing when you implement 16bit INT logic on a 32bit INT environment. Because I do a lot of documentation for

Re: [fpc-devel] *** GMX Spamverdacht *** An extension of fpc language: the BASED construct

2017-12-26 Thread Thorsten Engler
> Item: BYTE BASED ItemPtr; Ignoring any other considerations for now, I would have at least used a logical extension derived from already supported syntax: Item: Byte absolute ItemPtr^; ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] An extension of fpc language: the BASED construct

2017-12-26 Thread Mark Morgan Lloyd
On 26/12/17 12:45, Giuliano Colla wrote: /In short the BASED construct makes the C-style dereferencing operator unnecessary, by moving dereferencing from code to declaration. In fpc this translates into code looking like this, in this trivial example: var I: BYTE; I1: INTEGER;

[fpc-devel] An extension of fpc language: the BASED construct

2017-12-26 Thread Giuliano Colla
Hi fpc developers, here enclosed a patch to the compiler (and ppudump) to support the BASED construct (PL/1 and PL/M style), together with a patch to Lazarus codetools in order to be able to use it with Lazarus IDE. For those unfamiliar with the BASED