Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-11 Thread Ben Grasset
On Mon, Jun 10, 2019 at 6:21 AM Martin Frb wrote: > If you did have "procedure P1(x: ^Byte); overload;", how would you call it? > I would think it should be compatible *not* with this: type PB = type ^byte; but with anything declared like this: type PB = ^byte; On Mon, Jun 10, 2019 at 6:21 A

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-10 Thread Jonas Maebe
On 10/06/2019 12:57, Luca Olivetti wrote: In fact I see more and more lazarus being confused and I have to restart it frequently just to be able to make it code complete again instead of reporting bogus errors (but that may be just another bug). I think a lot of those cases are caused by http

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-10 Thread Luca Olivetti
El 10/6/19 a les 9:14, Michael Van Canneyt ha escrit: 2. I really want to see more arguments than the worn-out 'increased productivity' before adding another exception to an otherwise easy to understand rule in declaring procedures/functions. Simplicity has its virtues. I think that what rea

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-10 Thread Bernd Oppolzer
FYI: I thought a little bit more about your answer and decided to try it with my Stanford compiler; in fact, your pointer parameter is a VALUE parameter, and because it is copied into the procedure's local stack, it should be treated much like a local variable IMO, and there it is indeed possi

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-10 Thread Martin Frb
On 10/06/2019 04:00, Dmitry Boyarintsev wrote: function DoSomething (a: ^Integer; b: Pointer): integer; Should the flowing code (inside of DoSomething body) be ok as well?   ((^Integer)(b))^ := a^; (keep in mind that ^A ... ^Z is also a character escaping) Inside code / Outside declaration,

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-10 Thread Martin Frb
On 10/06/2019 02:47, Ben Grasset wrote: Yes? Obviously? I clearly demonstrated the technical benefit in my original comment. *Yet again *though I do not understand why this is controversial. It would amount to a very tiny syntax addition, that does *nothing *other than make certain things *easi

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-10 Thread Michael Van Canneyt
On Mon, 10 Jun 2019, Florian Klämpfl wrote: Am 10.06.2019 um 09:14 schrieb Michael Van Canneyt: Now, there exists an exception to this rule, introduced by Borland: open array parameters. Well, open strings and open arrays cannot be considered as real types imo (you cannot declare anythin

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-10 Thread Florian Klämpfl
Am 10.06.2019 um 09:14 schrieb Michael Van Canneyt: > > Now, there exists an exception to this rule, introduced by Borland: open > array parameters. Well, open strings and open arrays cannot be considered as real types imo (you cannot declare anything else than a parameter as open array/string)

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-10 Thread Florian Klämpfl
Am 10.06.2019 um 00:28 schrieb Ben Grasset: > On Sun, Jun 9, 2019 at 11:26 AM Florian Klämpfl > wrote: > > Yes, but this has *nothing* to do with the output of -vp. Nothing. > > > My point with that was more just getting at "clearly typed pointer aliases > ar

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-10 Thread Michael Van Canneyt
On Mon, 10 Jun 2019, Ben Grasset wrote: So, you're going to keep pretending like you're actually concerned about maintaining the integrity of some (completely fictional) "traditional" Pascal (that FPC never has been and was presumably never intended to be), and implying that arbitrary *synt

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-10 Thread denisgolovan
> You can do it like this (yes, works in mode Delphi as well): > > === code begin === > > {$mode objfpc} > {$modeswitch advancedrecords} > > type > generic TPointerType = record > public type > PT = ^T; > end; > > generic procedure MemCopy(Dest, Src: specialize > TPointerType.PT; Len: PtrUInt)

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-09 Thread Dmitry Boyarintsev
On Mon, Jun 10, 2019 at 12:57 AM Ben Grasset wrote: > So, you're going to keep pretending like you're actually concerned about > maintaining the integrity of some (completely fictional) "traditional" > Pascal (that FPC never has been and was presumably never intended to be), > and implying that a

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-09 Thread Ben Grasset
On Mon, Jun 10, 2019 at 12:15 AM Dmitry Boyarintsev < skalogryz.li...@gmail.com> wrote: > You've been told before. Variable types are not the same as parameter > types. > That *doesn't matter* in any *practical *sense. How you *used *something declared as "^Type" would always be the same no matte

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-09 Thread Dmitry Boyarintsev
On Sun, Jun 9, 2019 at 10:52 PM Ben Grasset wrote: > On Sun, Jun 9, 2019 at 10:28 PM Dmitry Boyarintsev < > skalogryz.li...@gmail.com> wrote: > >> So if you're fan of having ^Integer as a parameter type, then you pretty >> much self-declaring to be a fan of (^Integer)(varname) as well. >> > > Thi

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-09 Thread Ben Grasset
> > On Sun, Jun 9, 2019 at 10:28 PM Dmitry Boyarintsev < > skalogryz.li...@gmail.com> wrote: > >> t's kinda what language designers HAVE to do. >> It's nice just to throw out the "next-big-thing-cool-idea" out there and >> make yourself look smart. >> But you actually HAVE to think everything throu

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-09 Thread Ben Grasset
On Sun, Jun 9, 2019 at 10:28 PM Dmitry Boyarintsev < skalogryz.li...@gmail.com> wrote: > Distantly? you're proposing to introduce a reference-to-type declaration > within a parameter. Without giving it any name. > Fine. But that would requires a type-casting within the code to the same > type as h

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-09 Thread Dmitry Boyarintsev
On Sun, Jun 9, 2019 at 10:14 PM Ben Grasset wrote: > I mean, like *many, many, many *things, yes it is technically possible > for that to be valid Pascal syntax. As far as *should*, well, I'm not > personally a fan of that sort of too-many-parentheses typecasting, but I > wouldn't specifically ca

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-09 Thread Ben Grasset
On Sun, Jun 9, 2019 at 10:00 PM Dmitry Boyarintsev < skalogryz.li...@gmail.com> wrote: > Should the flowing code (inside of DoSomething body) be ok as well? > ((^Integer)(b))^ := a^; > I mean, like *many, many, many *things, yes it is technically possible for that to be valid Pascal syntax. As

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-09 Thread Ben Grasset
On Sun, Jun 9, 2019 at 9:19 PM Dmitry Boyarintsev wrote: > Ah... I found it now. It's all about generics. Well, there's nothing I > can argue about here. > Well, not *really.* As I stated in the original message, it's just as useful for non-generic procedures or non-generic anything else. On S

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-09 Thread Dmitry Boyarintsev
On Sun, Jun 9, 2019 at 8:48 PM Ben Grasset wrote: > Of course not. That would be rather nonsensical, *for very obvious > reasons*, that I've already gone out of my way to address in this comment > chain. It is however utterly ridiculous to directly correlate that with > `^Type` syntax, as they ar

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-09 Thread Ben Grasset
On Sun, Jun 9, 2019 at 8:37 PM Bernd Oppolzer wrote: > the base type must have been declared already > Well, not necessarily in FPC, because generics, but that would just follow the same way generic parameters are currently "filled in later" in all other areas. On Sun, Jun 9, 2019 at 8:37 PM Be

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-09 Thread Dmitry Boyarintsev
On Sun, Jun 9, 2019 at 9:05 PM Ryan Joseph wrote: > What if static array and record types were the exception? Avoiding making any exceptions in a design is typically a good thing. > Personally I’ve had to write dummy types more than once in order to get > around this design problem. If I had t

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-09 Thread Dmitry Boyarintsev
On Sun, Jun 9, 2019 at 8:48 PM Ben Grasset wrote: > On Sun, Jun 9, 2019 at 8:11 PM Dmitry Boyarintsev < > skalogryz.li...@gmail.com> wrote: > >> Do you really want to change it? If yes, what's the **technical** >> benefit? >> > > Yes? Obviously? I clearly demonstrated the technical benefit in my

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-09 Thread Ryan Joseph
> On Jun 9, 2019, at 9:17 PM, Ben Grasset wrote: > > On Sun, Jun 9, 2019 at 11:23 AM Ryan Joseph wrote: > var > a: ^integer; > begin > DoThis(a0); > > I'm assuming "a0" was just a typo there?... > typo. Regards, Ryan Joseph ___ fpc-

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-09 Thread Ben Grasset
On Sun, Jun 9, 2019 at 11:23 AM Ryan Joseph wrote: > var > a: ^integer; > begin > DoThis(a0); I'm assuming "a0" was just a typo there?... ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinf

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-09 Thread Ryan Joseph
> On Jun 9, 2019, at 8:11 PM, Dmitry Boyarintsev > wrote: > > Is it because parameter types are doesn't really match a type definition. > One can't do > function myFunc(var a: record a,b: integer; end): integer; > the record type has to be declared separately. > or > declaring > function

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-09 Thread Ben Grasset
On Sun, Jun 9, 2019 at 8:11 PM Dmitry Boyarintsev wrote: > One can't do > function myFunc(var a: record a,b: integer; end): integer; > the record type has to be declared separately. > Of course not. That would be rather nonsensical, *for very obvious reasons*, that I've already gone out of my

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-09 Thread Bernd Oppolzer
Am 10.06.2019 um 00:28 schrieb Ben Grasset: On Sun, Jun 9, 2019 at 11:26 AM Florian Klämpfl mailto:flor...@freepascal.org>> wrote: Yes, but this has *nothing* to do with the output of -vp. Nothing. My point with that was more just getting at "clearly typed pointer aliases are not actuall

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-09 Thread Dmitry Boyarintsev
On Sun, Jun 9, 2019 at 6:29 PM Ben Grasset wrote: > Again, literally nobody in this entire message chain has stated any actual > reason why exactly they think it would be specifically *bad* to have > `^Type` in method parameters. > Is it because parameter types are doesn't really match a type def

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-09 Thread John Doe
Personally I'd LOVE to see be possible. I'm pretty sure just about every Pascal developer out there has wanted to be able to do that kind of thing at some point. It's not like there's any real downsides to it either that I can think of. It doesn't make code harder to read. It's not ambiguous (beca

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-09 Thread Ben Grasset
On Sun, Jun 9, 2019 at 11:26 AM Florian Klämpfl wrote: > Yes, but this has *nothing* to do with the output of -vp. Nothing. > My point with that was more just getting at "clearly typed pointer aliases are not actually that big of a deal internally for FPC", as in it doesn't really matter if it *

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-09 Thread Ryan Joseph
> On Jun 9, 2019, at 11:25 AM, Florian Klämpfl wrote: > > Yes, but this has *nothing* to do with the output of -vp. Nothing. Sorry my mistake. Regards, Ryan Joseph ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freep

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-09 Thread Florian Klämpfl
Am 09.06.2019 um 17:23 schrieb Ryan Joseph: > > >> On Jun 9, 2019, at 9:45 AM, Florian Klämpfl wrote: >> >> And? It is obvious that FPC has to know what's the base type of a pointer >> else it couldn't do type checking. > > I think all he means is this: > > type > TInt = ^integer; > > proc

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-09 Thread Ryan Joseph
> On Jun 9, 2019, at 9:45 AM, Florian Klämpfl wrote: > > And? It is obvious that FPC has to know what's the base type of a pointer > else it couldn't do type checking. I think all he means is this: type TInt = ^integer; procedure DoThis(i: TInt); begin end; var a: ^integer; begin DoT

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-09 Thread Florian Klämpfl
Am 08.06.2019 um 21:30 schrieb Ben Grasset: > B) I was looking at some output from FPC's "-vp" flag today, and it's pretty > clear that the compiler is already > perfectly capable of knowing exactly what "^Type" means in all cases, because > *all* pointer type aliases in that output > are literal

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-08 Thread Ben Grasset
Two final things: A) I didn't really make this thread with to imply I necessarily wanted *someone else* to implement this. What I ultimately was trying to figure out is basically would I be wasting my time if I was able to implement this on my own, probably under a new modeswitch (maybe {$modeswit

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-07 Thread Ryan Joseph
> On Jun 7, 2019, at 5:30 PM, Sven Barth via fpc-devel > wrote: > > Huh? Who said anything about generics themselves? I meant the generic > keywords: "generic" and "specialize". So that those that want to use mode > ObjFPC without the keywords can do so. Ah, I see now. That’s even better. :

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-07 Thread Sven Barth via fpc-devel
Am 07.06.2019 um 23:17 schrieb Ryan Joseph: On Jun 7, 2019, at 5:06 PM, Sven Barth via fpc-devel wrote: No. The generic keywords are part of mode ObjFPC. The only thing I plan to do is to move the whole idea of generic keywords to a modeswitch, but that is neither here nor there currently.

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-07 Thread Ben Grasset
On Fri, Jun 7, 2019 at 3:44 PM Sven Barth via fpc-devel < fpc-devel@lists.freepascal.org> wrote: > "0..5" defines a new type. "set of (Alpha, Beta, Gamma)" defines a new > type. "record a, b: longint end" defines a new types. > Building on my last reply, also, here's an example that shows what I

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-07 Thread Ryan Joseph
> On Jun 7, 2019, at 5:06 PM, Sven Barth via fpc-devel > wrote: > > No. The generic keywords are part of mode ObjFPC. The only thing I plan to do > is to move the whole idea of generic keywords to a modeswitch, but that is > neither here nor there currently. Good idea to make generics a mod

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-07 Thread Sven Barth via fpc-devel
Am 07.06.2019 um 22:54 schrieb Ryan Joseph: On Jun 7, 2019, at 4:51 PM, Sven Barth via fpc-devel wrote: It has been part of FPC from the beginning of generics. It allows the parser to differentiate easier that a specialization is following. This was less important when only type declaratio

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-07 Thread Ryan Joseph
> On Jun 7, 2019, at 4:51 PM, Sven Barth via fpc-devel > wrote: > > It has been part of FPC from the beginning of generics. It allows the parser > to differentiate easier that a specialization is following. This was less > important when only type declarations could contain specializations,

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-07 Thread Sven Barth via fpc-devel
Am 07.06.2019 um 22:45 schrieb Ryan Joseph: On Jun 7, 2019, at 3:50 PM, Sven Barth via fpc-devel wrote: generic procedure MemCopy(Dest, Src: specialize TPointerType.PT; Len: PtrUInt); begin while Len > 0 do begin Dest^ := Src^; Inc(Dest); Inc(Src); Dec

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-07 Thread Ryan Joseph
> On Jun 7, 2019, at 4:44 PM, Ben Grasset wrote: > > You're just describing what is *currently* valid and not-valid syntax, which > we all already know. No one has explained *why* exactly "^Type" would be > somehow a negative thing in the context of method signatures, while at the > same tim

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-07 Thread Ryan Joseph
> On Jun 7, 2019, at 3:50 PM, Sven Barth via fpc-devel > wrote: > > generic procedure MemCopy(Dest, Src: specialize TPointerType.PT; Len: > PtrUInt); > begin > while Len > 0 do begin > Dest^ := Src^; > Inc(Dest); > Inc(Src); > Dec(Len); > end; > end; May

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-07 Thread Ben Grasset
On Fri, Jun 7, 2019 at 3:44 PM Sven Barth via fpc-devel < fpc-devel@lists.freepascal.org> wrote: > No, I think you *missed* the point. "^Type" defines a new type. "0..5" > defines a new type. "set of (Alpha, Beta, Gamma)" defines a new type. > "record a, b: longint end" defines a new types. All fo

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-07 Thread denisgolovan
Hi Sven Just my 50 cents. Just stumbled upon the same problem today. I mean typed pointer in generic function. But "specialize TPointerType.PT" is just too much noise. Personally, I consider this issue really annoying as for generics. -- Regards, Denis Golovan _

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-07 Thread Ben Grasset
On Fri, Jun 7, 2019 at 3:26 PM Jonas Maebe wrote: > So if you add something in it that is in fact the same as a regular type > definition, something is wrong. > What exactly is "wrong" there, though? In a world where they both worked, doing this, as we've discussed: procedure Proc(Param: ^TSome

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-07 Thread Sven Barth via fpc-devel
Am 07.06.2019 um 18:37 schrieb Ben Grasset: For example, consider the following code, that implements a generic "memcpy"-style procedure using a static advanced-record method: program Example; {$mode Delphi} type   TMem = record   public type     PT = ^T;   public     class procedure Copy(Des

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-07 Thread Sven Barth via fpc-devel
Am 07.06.2019 um 21:06 schrieb Ben Grasset: On Fri, Jun 7, 2019 at 2:35 PM Jonas Maebe > wrote: None of these can be defined as a type in parameter lists. Keep in mind that "^Type" defines a new type. Semantically, it's at the same level as "0..5"

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-07 Thread Jonas Maebe
On 07/06/2019 21:06, Ben Grasset wrote: On Fri, Jun 7, 2019 at 2:35 PM Jonas Maebe > wrote: Your "^Type" inline type definition would behave  exactly the same as a regular pointer type definition.  Of course. It would be strange if it didn't, I think. That'

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-07 Thread Ryan Joseph
> On Jun 7, 2019, at 3:06 PM, Ben Grasset wrote: > > To me it's always seemed illogical (in various different Pascal compilers > over time, not just FPC) that the "parameter" declarations there don't work, > whereas things like the "var" ones (which are just as "inline", I'd say) work > just

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-07 Thread Ben Grasset
On Fri, Jun 7, 2019 at 2:35 PM Jonas Maebe wrote: > None of these can be defined as a type in parameter lists. Keep in mind > that "^Type" defines a new type. Semantically, it's at the same level as > "0..5" and "record a, b: longint end;". > Right, that's the point. There's nothing else that *w

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-07 Thread Jonas Maebe
On 07/06/2019 20:26, Ben Grasset wrote: On Fri, Jun 7, 2019 at 1:47 PM Jonas Maebe > wrote: It would be inconsistent to only allow such declaration for pointers, and not for other types (a programming language should strive to be as orthogonal as possible

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-07 Thread Ben Grasset
On Fri, Jun 7, 2019 at 1:47 PM Jonas Maebe wrote: > It would be inconsistent to only allow such declaration for pointers, > and not for other types (a programming language should strive to be as > orthogonal as possible, with as few exceptions as possible). > I can't think of any particular vari

Re: [fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-07 Thread Jonas Maebe
On 07/06/2019 18:37, Ben Grasset wrote: B) Is there a specific reason is has *not* been implemented previously? (Seems unlikely) Pascal does not support declaring any new types inside parameter lists, apart from a) local procvar types (in ISO/MacPas modes) b) open arrays In both cases, these

[fpc-devel] Thoughts on being able to declare "pointer-to-type" parameters directly in method signatures?

2019-06-07 Thread Ben Grasset
For example, consider the following code, that implements a generic "memcpy"-style procedure using a static advanced-record method: program Example; {$mode Delphi} type TMem = record public type PT = ^T; public class procedure Copy(Dest: PT; Src: PT; Len: PtrUInt); static; inline;