Re: [fpc-pascal] Primitive Record Wrappers

2016-03-01 Thread Constantine Yannakopoulos
On Tue, Mar 1, 2016 at 3:59 PM, Mazola Winstrol wrote: > > Can you send me? > ​Done.​ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Primitive Record Wrappers

2016-03-01 Thread Constantine Yannakopoulos
On Mon, Feb 29, 2016 at 5:13 PM, Mazola Winstrol wrote: > I have noticed that, by using generics, we can't overload arithmetic > operators. > > E.g.: > > ... > class operator Negative(A: TNullableType): T; > ... > > class operator TNullableType.Negative(A: TNullableType):

Re: [fpc-pascal] Mode Delphi and functions as parameters.

2015-03-21 Thread Constantine Yannakopoulos
On Fri, Mar 20, 2015 at 11:55 AM, Michael Schnell mschn...@lumino.de wrote: what to to if a function has no parameter and returns a value that is a pointer to a function of exactly this type ? ​The logical thing for the compiler would be to assume that the programmer meant that a reference

[fpc-pascal] Base36 encoding

2015-03-06 Thread Constantine Yannakopoulos
Hello all. I need a couple of base36 (https://en.wikipedia.org/wiki/Base_36) encoding/decoding functions with the following or similar signatures: function Base36Encode(Buffer: TBytes): string; overload; function Base36Encode(const Buffer; BufSize: Integer): string; overload; function

Re: [fpc-pascal] Suggestion: TDataSetEnumerator

2015-03-05 Thread Constantine Yannakopoulos
On Thu, Mar 5, 2015 at 2:11 AM, silvioprog silviop...@gmail.com wrote: What do you think about a TDataSetEnumerator class in the DB unit? Something like this: === begin code === function TDataSetEnumerator.MoveNext: Boolean; begin Inc(FPosition); if FPosition = FDataSet.RecordCount

Re: [fpc-pascal] Effective memory allocation

2014-11-02 Thread Constantine Yannakopoulos
On Sun, Nov 2, 2014 at 3:54 PM, Xiangrong Fang xrf...@gmail.com wrote: Also, I usually use pointer to pass block of memory to functions. How do I implement a function with the following signature: procedure MyProc(var Buf; Len: Integer): I mean, how to handle var Buf inside the procedure

Re: [fpc-pascal] Getting info on a procedure parameter

2014-02-11 Thread Constantine Yannakopoulos
On Tue, Feb 11, 2014 at 4:52 PM, Marco van de Voort mar...@stack.nl wrote: In our previous episode, Mark Morgan Lloyd said: If a method a.WriteBuff() is passed another method b.finish() as a parameter, can it access b before calling finish(), or would this require an explicit parameter?

Re: [fpc-pascal] Nested generic parameters

2014-02-05 Thread Constantine Yannakopoulos
On Tue, Feb 4, 2014 at 2:47 PM, Sven Barth pascaldra...@googlemail.comwrote: Please report as a bug, so that it is not forgotten (and attach a simple example that compiles in Delphi). Done: http://bugs.freepascal.org/view.php?id=25678 Thanks again. --Constantine

[fpc-pascal] SVN revisions and builds

2014-02-04 Thread Constantine Yannakopoulos
Hi all, We use FPC trunk for the development of several projects and we download it from ftp://freepascal.dfmk.hu/pub/lazarus/snapshots/ However for FPC 2.7.1, the latest build is from September. Is there any plan to update it? Or is there a more updated ftp directory somewhere else we could

[fpc-pascal] Nested generic parameters

2014-02-04 Thread Constantine Yannakopoulos
Hello again, Can I use a defined generic type parameter inside a constraint of the same generic declaration on FPC trunk code? Something like: {$mode Delphi} type TFooT = class end; TGenericT, U: TFooT = class end; This compiles in Delphi XE or later but in FPC it gives the error

Re: [fpc-pascal] Documentation, syntax diagrams

2014-01-09 Thread Constantine Yannakopoulos
On Thu, Jan 9, 2014 at 9:55 AM, Sven Barth pascaldra...@googlemail.comwrote: Am 08.01.2014 22:01, schrieb Michael Van Canneyt: You can preview the result at http://www.freepascal.org/~michael/ref/refch3.html You might additionally mention that these type aliases also allow different