[fpc-pascal] AbstractError in 3.1.1

2017-10-11 Thread Ryan Joseph
I just built the ppcx64 trunk version 3.1.1 so I could try the memory management operator overloads we talked about but I’m getting a compiler error in my project that doesn’t make sense. On the last line of one unit (literally at end.) I get: error: identifier idents no member

Re: [fpc-pascal] FPC attributes / annotations support

2017-10-11 Thread Sven Barth via fpc-pascal
Am 11.10.2017 14:45 schrieb "Graeme Geldenhuys" < mailingli...@geldenhuys.co.uk>: > > Bringing a discussion from the Lazarus mailing list to here. > > > On 2017-09-24 09:13, Michael Van Canneyt via Lazarus wrote: > > It's called Attributes. FPC has it too, but it is not yet in trunk. > > Is there

Re: [fpc-pascal] Const params question

2017-10-11 Thread Sven Barth via fpc-pascal
Am 11.10.2017 15:28 schrieb "Ryan Joseph" : > > > > > On Oct 11, 2017, at 5:01 PM, Michael Van Canneyt wrote: > > > > No, you need constref then. > > Ok, so constref/var are the same in terms of copying. The docs say const reduces stack size? I

Re: [fpc-pascal] no fpc.exe file after installation

2017-10-11 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: > > The order of things is roughly > > snip... > > Wow, that sounds very labour intensive. > > The Joel Test: 12 Steps to better code > https://www.joelonsoftware.com/2000/08/09/the-joel-test-12-steps-to-better-code/ He confuses release and

Re: [fpc-pascal] Const params question

2017-10-11 Thread Ryan Joseph
> On Oct 11, 2017, at 5:01 PM, Michael Van Canneyt > wrote: > > No, you need constref then. Ok, so constref/var are the same in terms of copying. The docs say const reduces stack size? I never label my parameters with const but maybe it’s worth it some cases.

Re: [fpc-pascal] Google Drive API

2017-10-11 Thread Michael Van Canneyt
On Wed, 11 Oct 2017, Marcos Douglas B. Santos wrote: Hi, I would like to know if FPC implements the full Google Drive API. If so, since which version? Yes, since version 3.0.2. FPC also contains a tool to generate a new API if google changes it (they have a lot of APIS, which get updated

Re: [fpc-pascal] where's the glyph?

2017-10-11 Thread pascalX
On 11/10/17 13:28, Sven Barth via fpc-pascal wrote: Am 11.10.2017 13:13 schrieb >: > > Hi, > > LCL provides the usual Delphi equivalent components like TBitBtn and TSpeedButton  but there do not seem to be any glyphs to go with them. > >

Re: [fpc-pascal] Const params question

2017-10-11 Thread Marcos Douglas B. Santos
On Wed, Oct 11, 2017 at 9:33 AM, wrote: > On 11/10/17 13:11, Michael Van Canneyt wrote: >> >> Delphi has recently > > > Huh? I thought Delphi got shut down years ago. See https://www.embarcadero.com/products/delphi Marcos Douglas

[fpc-pascal] FPC attributes / annotations support

2017-10-11 Thread Graeme Geldenhuys
Bringing a discussion from the Lazarus mailing list to here. On 2017-09-24 09:13, Michael Van Canneyt via Lazarus wrote: > It's called Attributes. FPC has it too, but it is not yet in trunk. Is there a timeline when FPC might support attributes/annotations in trunk? Regards, Graeme

[fpc-pascal] Google Drive API

2017-10-11 Thread Marcos Douglas B. Santos
Hi, I would like to know if FPC implements the full Google Drive API. If so, since which version? First, I need to implement upload, download and search of files [1]. Any example? [1] https://developers.google.com/drive/v3/web/manage-uploads Thanks, Marcos Douglas

Re: [fpc-pascal] Const params question

2017-10-11 Thread pascalX
On 11/10/17 13:11, Michael Van Canneyt wrote: Delphi has recently Huh? I thought Delphi got shut down years ago. :? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] where's the glyph?

2017-10-11 Thread Sven Barth via fpc-pascal
Am 11.10.2017 13:13 schrieb : > > Hi, > > LCL provides the usual Delphi equivalent components like TBitBtn and TSpeedButton but there do not seem to be any glyphs to go with them. > > Do I really have to make my own or are there some resources I have not found ? Lazarus/LCL

Re: [fpc-pascal] where's the glyph?

2017-10-11 Thread pascalX
On 11/10/17 12:23, Vojtěch Čihák wrote: Hi, TBitBtn has property Kind, setting it to anything else than bkCustom will show the glyph (native, from widgetset). With TSpeedButton, you are always on your own. V. Hi, LCL provides the usual Delphi equivalent components like TBitBtn and

Re: [fpc-pascal] Const params question

2017-10-11 Thread Marcos Douglas B. Santos
On Wed, Oct 11, 2017 at 9:11 AM, Michael Van Canneyt wrote: > > On Wed, 11 Oct 2017, Marcos Douglas B. Santos wrote: > > [...] >> Is constref compatible with Delphi? > > > Delphi has recently introduced some annotation for the same purpose. > > As usual, they chose to do

Re: [fpc-pascal] Const params question

2017-10-11 Thread Graeme Geldenhuys
On 2017-10-11 12:03, Michael Van Canneyt wrote: It is actually documented: I'm a step ahead. :-) Just after I sent my email, I did actually go check the documentation and read up on it. Thanks for pointing it out though. Regards, Graeme ___

Re: [fpc-pascal] Const params question

2017-10-11 Thread Michael Van Canneyt
On Wed, 11 Oct 2017, Marcos Douglas B. Santos wrote: On Wed, Oct 11, 2017 at 7:01 AM, Michael Van Canneyt wrote: On Wed, 11 Oct 2017, Ryan Joseph wrote: If you declare a parameter as const does that effectively behave like passing by reference? I have some

Re: [fpc-pascal] Const params question

2017-10-11 Thread Marcos Douglas B. Santos
On Wed, Oct 11, 2017 at 7:01 AM, Michael Van Canneyt wrote: > > > On Wed, 11 Oct 2017, Ryan Joseph wrote: > >> If you declare a parameter as const does that effectively behave like >> passing by reference? I have some performance sensitive functions that >> take records

Re: [fpc-pascal] where's the glyph?

2017-10-11 Thread Vojtěch Čihák
Hi,   TBitBtn has property Kind, setting it to anything else than bkCustom will show the glyph (native, from widgetset).   With TSpeedButton, you are always on your own.   V. __ Od: pasc...@piments.com Komu:

Re: [fpc-pascal] {$DEFINE DEVEL}

2017-10-11 Thread pascalX
On 11/10/17 12:00, Mattias Gaertner wrote: On Wed, 11 Oct 2017 11:45:33 +0100 pasc...@piments.com wrote: [...] It wasn't a reply because they was no Re and it had a new title. I should have deleted the [fpc-pascal] as well . Sorry. A reply is not defined by the title. It is marked by the

[fpc-pascal] where's the glyph?

2017-10-11 Thread pascalX
Hi, LCL provides the usual Delphi equivalent components like TBitBtn and TSpeedButton but there do not seem to be any glyphs to go with them. Do I really have to make my own or are there some resources I have not found ? Thanks. ___ fpc-pascal

Re: [fpc-pascal] Const params question

2017-10-11 Thread Michael Van Canneyt
On Wed, 11 Oct 2017, Graeme Geldenhuys wrote: On 2017-10-11 11:36, Michael Van Canneyt wrote: In the case of const, you don't know. The compiler will do as it sees fit. Oh wow, I really didn't know that. snip The difference is that you can assign something to a var parameter, but

Re: [fpc-pascal] {$DEFINE DEVEL}

2017-10-11 Thread Mattias Gaertner
On Wed, 11 Oct 2017 11:45:33 +0100 pasc...@piments.com wrote: >[...] > It wasn't a reply because they was no Re and it had a new title. > > I should have deleted the [fpc-pascal] as well . Sorry. A reply is not defined by the title. It is marked by the hidden References aka In-Reply-To

Re: [fpc-pascal] Const params question

2017-10-11 Thread Graeme Geldenhuys
On 2017-10-11 11:36, Michael Van Canneyt wrote: In the case of const, you don't know. The compiler will do as it sees fit. Oh wow, I really didn't know that. snip The difference is that you can assign something to a var parameter, but you cannot assign something to a constref.

Re: [fpc-pascal] no fpc.exe file after installation

2017-10-11 Thread Graeme Geldenhuys
On 2017-10-11 10:59, Marco van de Voort wrote: The order of things is roughly > snip... Wow, that sounds very labour intensive. The Joel Test: 12 Steps to better code https://www.joelonsoftware.com/2000/08/09/the-joel-test-12-steps-to-better-code/ Take note of Step 2. ;-) I take it your

Re: [fpc-pascal] Const params question

2017-10-11 Thread Michael Van Canneyt
On Wed, 11 Oct 2017, Graeme Geldenhuys wrote: On 2017-10-11 11:01, Michael Van Canneyt wrote: No, you need constref then. So for the record In the example given, will const make a copy of the record and constref will pass in the original record (no copy of data)? In the case of

Re: [fpc-pascal] Const params question

2017-10-11 Thread Graeme Geldenhuys
On 2017-10-11 11:01, Michael Van Canneyt wrote: No, you need constref then. So for the record In the example given, will const make a copy of the record and constref will pass in the original record (no copy of data)? If so, then what's the difference between constref and var? Because

Re: [fpc-pascal] Const params question

2017-10-11 Thread Michael Van Canneyt
On Wed, 11 Oct 2017, Ryan Joseph wrote: If you declare a parameter as const does that effectively behave like passing by reference? I have some performance sensitive functions that take records as arguments and I don’t want copying to the stack so I’ve been using @ but maybe const is just as

Re: [fpc-pascal] no fpc.exe file after installation

2017-10-11 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: > > Well, lack of manpower is not that odd:) > > Isn't building the installations automated tasks? The order of things is roughly to prepare a prepare a release branch: - there is a script to branch, and - a few scripts that help with

[fpc-pascal] Const params question

2017-10-11 Thread Ryan Joseph
If you declare a parameter as const does that effectively behave like passing by reference? I have some performance sensitive functions that take records as arguments and I don’t want copying to the stack so I’ve been using @ but maybe const is just as good? Thanks. Regards, Ryan

Re: [fpc-pascal] Resource compilation

2017-10-11 Thread Sven Barth via fpc-pascal
Am 11.10.2017 08:11 schrieb "Martok" : > > Am 25.09.2017 um 14:24 schrieb Sven Barth via fpc-pascal: > > The RC language itself isn't *that* difficult. Main difficulty would be to > > essentially implement a C-preprocessor-compatible preprocessor. > As I have just

Re: [fpc-pascal] {$DEFINE DEVEL}

2017-10-11 Thread Mattias Gaertner
On Wed, 11 Oct 2017 10:00:15 +0100 pasc...@piments.com wrote: > Hi , First of all: Please do not "reply" when starting a new thread. > I had a little trick that I used on BP and Delphi code that does not > work on Lazarus. The compiler is FPC. > I define compiler variable which I could

Re: [fpc-pascal] {$DEFINE DEVEL}

2017-10-11 Thread José Mejuto
El 11/10/2017 a las 11:00, pasc...@piments.com escribió: {$DEFINE DEVEL} Can anyone suggest a similar one key trick ? Hello, I'm using {.$DEFINE DEVEL} -- ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] {$DEFINE DEVEL}

2017-10-11 Thread Tony Whyman
Try adding a space between the { and $ e.g. { $DEFINE DEVEL} FPC then ignores the define On 11/10/17 10:00, pasc...@piments.com wrote: Hi , I had a little trick that I used on BP and Delphi code that does not work on Lazarus. I define compiler variable which I could toggle on and off by

[fpc-pascal] {$DEFINE DEVEL}

2017-10-11 Thread pascalX
Hi , I had a little trick that I used on BP and Delphi code that does not work on Lazarus. I define compiler variable which I could toggle on and off by adding a second opening curly bracket, since the define only works if the line starts {$ {$DEFINE DEVEL} If I start the line {{$

Re: [fpc-pascal] Resource compilation

2017-10-11 Thread Martok
Am 25.09.2017 um 14:24 schrieb Sven Barth via fpc-pascal: > The RC language itself isn't *that* difficult. Main difficulty would be to > essentially implement a C-preprocessor-compatible preprocessor. As I have just discovered, the installer provides a (rather antique) gcc on Windows and depends

Re: [fpc-pascal] compiler option for $J directive

2017-10-11 Thread Sven Barth via fpc-pascal
Am 11.10.2017 05:12 schrieb "Mr Bee via fpc-pascal" < fpc-pascal@lists.freepascal.org>: > > 2017-10-10 13:28 GMT+07:00 Marco van de Voort : >> >> >> Since it is already largely uploaded, no. We are only waiting on some >> targets. > > > I thought such a minor fix that don't break

Re: [fpc-pascal] compiler option for $J directive

2017-10-11 Thread Sven Barth via fpc-pascal
Am 11.10.2017 07:00 schrieb "Mr Bee via fpc-pascal" < fpc-pascal@lists.freepascal.org>: > > 2017-10-10 16:21 GMT+07:00 Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org>: >> >> They were used mainly back at TP times to have procedure local static variables (cause that is how they behave