Re: [fpc-pascal] Documentation, syntax diagrams

2014-01-09 Thread Constantine Yannakopoulos
On Thu, Jan 9, 2014 at 9:55 AM, Sven Barth wrote: > 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 operator and (AFAIK a

[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 us

[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 TFoo = class end; TGeneric> = class end; This compiles in Delphi XE or later but in FPC it gives the error "Identifier n

Re: [fpc-pascal] Nested generic parameters

2014-02-05 Thread Constantine Yannakopoulos
On Tue, Feb 4, 2014 at 2:47 PM, Sven Barth wrote: > 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-pa

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 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? > > > > If

Re: [fpc-pascal] Hack for C-like macro functions — will it work in future?

2014-09-24 Thread Constantine Yannakopoulos
On Wed, Sep 24, 2014 at 12:17 PM, Sven Barth wrote: > Am 24.09.2014 10:15 schrieb "Tomas Hajny" : > > However, the trunk compiler offers also another option, although it may > or > > may not be usable for you. In particular, take the following: > > > > - > > var > > S2: string; > > > > p

Re: [fpc-pascal] Effective memory allocation

2014-11-02 Thread Constantine Yannakopoulos
On Sun, Nov 2, 2014 at 3:54 PM, Xiangrong Fang 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 body? > U

Re: [fpc-pascal] Suggestion: TDataSetEnumerator

2015-03-05 Thread Constantine Yannakopoulos
On Thu, Mar 5, 2015 at 2:11 AM, silvioprog 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 then > Ex

[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 Base36Decod

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 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 should be passed​.

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): T; > begin > Result

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