Re: [fpc-pascal] ptop and comma.

2020-02-24 Thread Sven Barth via fpc-pascal
fredvs via fpc-pascal schrieb am Mo., 24. Feb. 2020, 02:10: > Tomas Hajny-2 wrote > > The difference between your version and the original one is that the > > original finishes the program with some error code thus allowing some > > error checking in case the program was called from some script,

Re: [fpc-pascal] Property write access on records

2020-03-02 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Mo., 2. März 2020, 22:47: > In the snippet below why isn't it an error to write to a field of the > read-only property? I was hoping this would give me some type safety but it > just writes to a temp variable and does nothing. Not very helpful if you > ask

Re: [fpc-pascal] Error on https://www.freepascal.org/download.var

2020-03-03 Thread Sven Barth via fpc-pascal
Martin schrieb am Di., 3. März 2020, 10:46: > The page https://www.freepascal.org/download.var gives an error. > > It is still linked in many places as the download page for fpc. > > Has it moved, or does it need fixing? > The var pages were disabled recently. It should now point to

Re: [fpc-pascal] Best start point for adding new FPC target

2020-01-29 Thread Sven Barth via fpc-pascal
Karoly Balogh (Charlie/SGR) schrieb am Mi., 29. Jan. 2020, 01:22: > However, you need to add the new target it to the build system, and the > compiler, which is quite complicated, as a system ID and various > properties have to be added to quite a few places (compiler, > /systems/t_bsd.pas,

Re: [fpc-pascal] Custom operator

2020-02-01 Thread Sven Barth via fpc-pascal
Mr Bee via fpc-pascal schrieb am So., 2. Feb. 2020, 02:11: > Hi all, > > Besides overloading available operators, could we make our own custom > operator(s) in FPC? > > For example, I want to use ∑ to sum array values? Also other Unicode > characters such as ≥, ≤, ±, ≠, etc as custom operators?

Re: [fpc-pascal] Interface type error

2020-02-02 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am So., 2. Feb. 2020, 03:37: > Why doesn't this compile? IClassName2 descends from IClassName1 so > shouldn't TClassName be compatible with IClassName1? > > > > {$mode objfpc} > {$interfaces corba} > > program test; > >

Re: [fpc-pascal] Interface type error

2020-02-02 Thread Sven Barth via fpc-pascal
Am 02.02.2020 um 12:49 schrieb Ryan Joseph via fpc-pascal: On Feb 2, 2020, at 3:23 PM, Sven Barth via fpc-pascal wrote: As I had explained in the other thread some months ago interfaces in Object Pascal mean literally that the type can be cast to the specified interfaces. Parent interfaces

Re: [fpc-pascal] PPCJVM and Android Bionic compatibility question

2020-02-02 Thread Sven Barth via fpc-pascal
Am 02.02.2020 um 14:06 schrieb Mgr. Janusz Chmiel via fpc-pascal: Dear specialists here, How complex would be to recode Free Pascal compiler for ARM and ARM64 Bit so it would be fully compatible with Android Bionic library, so it would be executed as A external app from some Android app

Re: [fpc-pascal] Compiler treatment of dotted reference in class property

2020-02-03 Thread Sven Barth via fpc-pascal
Howard Page-Clark via fpc-pascal schrieb am Mo., 3. Feb. 2020, 11:22: > FPC 3.0.4 compiles this code excerpt without a murmur: > > == code == > > {$mode objfpc}{$H+} > > type > >TSheetInfo = record > name: String; > tab: String; > title: String; > kind: TSheetKind; // an

Re: [fpc-pascal] $modeswitch from command line

2020-02-03 Thread Sven Barth via fpc-pascal
Am 03.02.2020 um 23:19 schrieb Mr Bee via fpc-pascal: Hi all, Is there a way to enable a mode switches from fpc command line? Yes, using -M, however these are discarded as soon as a $Mode directive is read (just like any $Mode directive resets any $Modeswitch directive). Regards, Sven

Re: [fpc-pascal] OpenCV

2020-02-14 Thread Sven Barth via fpc-pascal
Adriaan van Os schrieb am Fr., 14. Feb. 2020, 12:22: > > SWIG 4.0.1 did build out of the box on OSX, the Delphi version did not. > Porting the Delpi changes > > to a newer version of SWIG will take time too. Is there any special > reason why Delphi support is > > not accepted for the SWIG main

Re: [fpc-pascal] Linker switch

2020-02-18 Thread Sven Barth via fpc-pascal
- via fpc-pascal schrieb am Di., 18. Feb. 2020, 13:16: > Hi, > > A while ago (5 years) I made an application where I had to add -k-l > to the command-line the compile that application. > Is there a way to add this in the source ? > I spent a good time to find out how I compiled that

Re: [fpc-pascal] Array of const: docs

2020-02-09 Thread Sven Barth via fpc-pascal
Alexey Tor. via fpc-pascal schrieb am So., 9. Feb. 2020, 17:45: > https://www.freepascal.org/docs-html/ref/refsu69.html > Remark: Note that there is no support for QWord arguments in array of > const. This is for Delphi compatibility, and the compiler will ignore > any resulting range checks

Re: [fpc-pascal] How to rebuild an fpc package

2020-02-11 Thread Sven Barth via fpc-pascal
Christo Crause via fpc-pascal schrieb am Di., 11. Feb. 2020, 19:42: > On Tue, Feb 11, 2020 at 4:57 PM Luis - SoftSAT Sistemas < > l...@softsatsistemas.com.br> wrote: > >> > You are using relative paths in -Fu and your current folder is >> c:\lazarus\fpc\3.0.4\source\packages\fcl-db, so >> >

Re: [fpc-pascal] FreeVision Resources?

2020-02-16 Thread Sven Barth via fpc-pascal
Kevin Monceaux schrieb am Sa., 15. Feb. 2020, 18:24: > On Sat, Feb 15, 2020 at 08:54:31AM +, Graeme Geldenhuys wrote: > > On 13/02/2020 3:37 pm, Kevin Monceaux wrote: > > > What's the definition of a legacy system? One that works! > > > > > > Brilliant tag line by the way! So true these

Re: [fpc-pascal] Delphi generics bug?

2020-01-14 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Di., 14. Jan. 2020, 14:31: > > > > On Jan 14, 2020, at 8:04 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > It's a bug because constraints should not be allowed in definitions, > only in

Re: [fpc-pascal] TProcess and zombie processes in *nix systems

2020-01-21 Thread Sven Barth via fpc-pascal
Am 21.01.2020 um 22:04 schrieb Marco van de Voort: Op 2020-01-21 om 21:40 schreef Graeme Geldenhuys:   ie: I want to launch a new application in a separate OS process and then forget about it. This is the responsibility of the callee I think, to daemonize and cut the cord so to speak.

Re: [fpc-pascal] Delphi generics bug?

2020-01-14 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Di., 14. Jan. 2020, 11:26: > Is this a bug or intended behavior? I would think there should a type > mismatch. > > {$mode delphi} > program test; > > type > TFooA = class > end; > > type > TFooB = class > end; > > type > TList = class >

Re: [fpc-pascal] Calling function pointer to main program

2020-01-02 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Do., 2. Jan. 2020, 18:11: > I need to override the main program function and then call back the main > program later. I know I can use -XM to set another function name besides > "main" but then how do I call back the original function "main" later? > What

Re: [fpc-pascal] Interface delegates and the implements property specifier

2019-12-24 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Di., 24. Dez. 2019, 02:47: > > > > On Dec 23, 2019, at 7:57 PM, Ryan Joseph wrote: > > > > I never heard of "mixin" before but I'll study the wiki. > > > > I assume that the compiler team has decided multiple inheritance is a > bad idea correct? Personally

Re: [fpc-pascal] Interface delegates and the implements property specifier

2019-12-22 Thread Sven Barth via fpc-pascal
Adriaan van Os schrieb am So., 22. Dez. 2019, 20:53: > I have always wondered why hierarchies in object-oriented programming are > idolized, where in the > database world hierarchical databases are something of the past and > everything is relational there > now

Re: [fpc-pascal] Interface delegates and the implements property specifier

2019-12-22 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal > > > On Dec 22, 2019, at 5:26 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > You don't seem to understand what implementing an interface means in > Object Pascal. It means that a class can be cast to a

Re: [fpc-pascal] Interface delegates and the implements property specifier

2019-12-27 Thread Sven Barth via fpc-pascal
Am 26.12.2019 um 20:32 schrieb Ryan Joseph via fpc-pascal: On Dec 24, 2019, at 1:16 AM, Sven Barth via fpc-pascal wrote: Basically, yes, though of course syntax, implementation and behavior need to be nicely defined first. For example there is the difference whether something is added

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread Sven Barth via fpc-pascal
fredvs via fpc-pascal schrieb am Mi., 11. März 2020, 13:25: > By the way, huh, yes, if I am totally sure that the code is safe, I would > be > happy to know the code-number of those Warning and disable it. > > Of course in last resort (no time to be lazy). > You can find out any message id by

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread Sven Barth via fpc-pascal
fredvs via fpc-pascal schrieb am Mi., 11. März 2020, 12:51: > > Other question relative to Warnings: > > How to do this: > > tdataevent(de_afterapplyupdate) > > where TDataEvent is defined as > > TDataEvent = (deFieldChange, deRecordChange, deDataSetChange, > deDataSetScroll,

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread Sven Barth via fpc-pascal
fredvs via fpc-pascal schrieb am Mi., 11. März 2020, 11:16: > Hello. > > Compiling that code with fpc 3.2.0 gives the warning that follows: > > ---> if (kind <> tabulatorkindty(-1)) --> gives now the warning: > > "msedrawtext.pas(1115,48) Warning: range check error while evaluating > constants

Re: [fpc-pascal] modeswitch multihelpers precedence problem

2020-03-10 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Di., 10. März 2020, 09:03: > > > > On Mar 10, 2020, at 11:57 AM, Anthony Walter via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > To demonstrate, if I have MyUnit.pas that defines a string type helper > with EndsWith() and an IntToStr()

Re: [fpc-pascal] modeswitch multihelpers precedence problem

2020-03-10 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am Di., 10. März 2020, 08:11: > > > On Tue, 10 Mar 2020, Anthony Walter via fpc-pascal wrote: > > > I started adding {$modeswitch multihelpers} to some of my code and > noticed > > a problem. It would seem that the SysUtils unit is defining type helpers > > for the

Re: [fpc-pascal] Property write access on records

2020-03-06 Thread Sven Barth via fpc-pascal
Am 06.03.2020 um 03:17 schrieb Ryan Joseph via fpc-pascal: On Mar 5, 2020, at 2:24 PM, Ryan Joseph wrote: Can we consider changing this behavior? from https://lists.freepascal.org/pipermail/fpc-pascal/2020-March/057434.html On 05/03/2020 08:24, Ryan Joseph via fpc-pascal wrote: Yes,

Re: [fpc-pascal] Property write access on records

2020-03-07 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Sa., 7. März 2020, 05:18: > > > > On Mar 7, 2020, at 5:15 AM, Sven Barth > wrote: > > > > I've found two bug reports related to this (I searched for "property" > and only those reports that are neither closed nor resolved): > > -

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0 (fredvs)

2020-03-14 Thread Sven Barth via fpc-pascal
fredvs via fpc-pascal schrieb am Sa., 14. März 2020, 13:01: > So, thanks for the tip, "kind" seems indeed initialized with first item. > Please note that this is only true for global variables and fields of classes. And it's not initialized with the first item, but with 0. Regards, Sven >

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0 (fredvs)

2020-03-14 Thread Sven Barth via fpc-pascal
Am 14.03.2020 um 17:18 schrieb fredvs via fpc-pascal: Hi Sven, sorry to come back, (dont forget I am a enum-guru now). But to be totally logic, in the previous code: if kind = tabulatorkindty(0) then Should it not be something illegal because of definition: tabulatorkindty = (tak_none :=

Re: [fpc-pascal] New Warnings with fpc >= 3.2.0

2020-03-11 Thread Sven Barth via fpc-pascal
schrieb am Mi., 11. März 2020, 16:37: > On 3/11/20 11:35 AM, fredvs via fpc-pascal wrote: > >> f (kind in tabulatorkindty) then > > > > Yes, I like it! > > > > But, sadly, the compiler no. > > > > "Error: Operator is not overloaded"... > > > that's weird... i thought that construct was standard

Re: [fpc-pascal] About fpc license.

2020-04-10 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am Fr., 10. Apr. 2020, 07:44: > > > On Thu, 9 Apr 2020, fredvs via fpc-pascal wrote: > > > Hello. > > > > I have done a fork of fpc fixes_3_2 and made some modification of > original > > code. > > > > May I distribute the fpc binary of that patched version with the

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread Sven Barth via fpc-pascal
Am 11.04.2020 um 15:18 schrieb fredvs via fpc-pascal: I hope that you understand that: https://github.com/fredvs/freepascal was done not for create a new war but because some features are really needed. We have different opinions about what is needed and what is not. Or what even is the

Re: [fpc-pascal] Error format question

2020-04-11 Thread Sven Barth via fpc-pascal
Am 11.04.2020 um 08:11 schrieb Ryan Joseph via fpc-pascal: Sorry to ask this yet again but I keep forgetting or remembering wrong. I thought this was a one time error that was fixed but I'm still getting different error formats with the trunk (as of today) vs 3.0.4. Can anyone please confirm

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread Sven Barth via fpc-pascal
Am 11.04.2020 um 14:46 schrieb fredvs via fpc-pascal: It will create one in your home directory if it detects you do not have root access. Could you explain that? Of course if you can show me a trick for configuring a script that will install fpc in the home directory (.fpc.cfg), with for

Re: [fpc-pascal] enumerate record fields at runtime

2020-04-07 Thread Sven Barth via fpc-pascal
Fabio Luis Girardi via fpc-pascal schrieb am Di., 7. Apr. 2020, 14:58: > > Using RTTI I can count the record fields, but until now, I can't find a > way to get the field names. > More is not possible as of now. Only once the Extended RTTI is supported this will be possible. Regards, Sven

Re: [fpc-pascal] Error format question

2020-04-12 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am So., 12. Apr. 2020, 08:53: > > > > On Apr 12, 2020, at 11:16 AM, Ryan Joseph wrote: > > > > I just did svn up and got r44689, rebuilt the compiler but I still get > the same error format. Was it supposed to be changed? > > ok, I think we're confused here.

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-12 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am So., 12. Apr. 2020, 12:16: > > > On Sun, 12 Apr 2020, Bo Berglund via fpc-pascal wrote: > > > On Fri, 10 Apr 2020 13:44:17 -0700 (MST), fredvs via fpc-pascal > > wrote: > > > >> 2)Your home directory, it looks for .fpc.cfg. > > > > This is something I have

[fpc-pascal] New Target Announcement: Windows on ARM64

2020-04-21 Thread Sven Barth via fpc-pascal
Hello together! I'm happy to announce initial support for the Windows on ARM64 target, aka aarch64-win64. Simple programs work already and the compiler is at least able to display its help message (when trying to compiler something it silently crashes, I've not yet found out why that is the

Re: [fpc-pascal] Error format question

2020-04-19 Thread Sven Barth via fpc-pascal
Am 12.04.2020 um 09:40 schrieb Sven Barth: Ryan Joseph via fpc-pascal > schrieb am So., 12. Apr. 2020, 08:53: > On Apr 12, 2020, at 11:16 AM, Ryan Joseph mailto:generic...@gmail.com>> wrote: > > I just did svn up and got r44689, rebuilt the

Re: [fpc-pascal] About fpc license.

2020-04-10 Thread Sven Barth via fpc-pascal
Luca Olivetti schrieb am Fr., 10. Apr. 2020, 16:11: > El 10/4/20 a les 14:30, Michael Van Canneyt ha escrit: > > > We don't need to use this mechanism ourselves (I've never needed it), > > Probably because you already have the needed dev package installed or > created the symlink yourself. > No

Re: [fpc-pascal] Killing the mail list

2020-03-15 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am So., 15. März 2020, 15:33: > It's 2020 and the mail list is starting to really show its age. I don't > get first messages from gmail and my personal web host is whitelisted, > messages bounce when I use the wrong account by accident, hard to search > the

Re: [fpc-pascal] Pass open array to static array?

2020-03-16 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Mo., 16. März 2020, 07:33: > Ok, that makes sense now. Dynamic arrays can't be passed to static arrays. > I > remember when I tried to make aligned dynamic arrays I got to look around > in > the code and it seems plausible you could just make a memcpy call

Re: [fpc-pascal] Pass open array to static array?

2020-03-15 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am So., 15. März 2020, 19:58: > > > > On Mar 15, 2020, at 8:53 PM, Howard Page-Clark via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > > > With recent FPCs you can however do this: > > > > program test; > > var > > data: array[0..2] of

Re: [fpc-pascal] Pass open array to static array?

2020-04-04 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Fr., 3. Apr. 2020, 21:03: > > > > On Apr 3, 2020, at 10:09 PM, Sven Barth > wrote: > > > > If your DoThis would be declared with a dynamic array parameter (e.G. > "specialize TArray") then you'd in fact have a temporary dynamic > array constructed on the

Re: [fpc-pascal] Range check error warning.

2020-03-25 Thread Sven Barth via fpc-pascal
schrieb am Mi., 25. März 2020, 18:47: > On 3/24/20 6:58 PM, Sven Barth via fpc-pascal wrote: > > wkitt...@windstream.net schrieb am Di., 24. März 2020, 18:37: > > > >> you should figure out why typed constants are not being allowed/used > >> in your set

Re: [fpc-pascal] Range check error warning.

2020-03-25 Thread Sven Barth via fpc-pascal
schrieb am Mi., 25. März 2020, 19:48: > On 3/25/20 2:17 PM, Sven Barth via fpc-pascal wrote: > > wkitt...@windstream.net schrieb am Mi., 25. März 2020, 18:47: > > > >> hummm... ok, so how to you get a constant to be a byte and storing 7 > for the > >> dec

Re: [fpc-pascal] Pass open array to static array?

2020-04-03 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Fr., 3. Apr. 2020, 04:13: > > > > On Mar 16, 2020, at 5:40 AM, Sven Barth > wrote: > > > > The message of the compiler is a bit misleading. It's a *dynamic* array > that is created there, not an *open* array. Open arrays only exist when > being passed

Re: [fpc-pascal] Pass open array to static array?

2020-04-03 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Fr., 3. Apr. 2020, 14:33: > > > > > On Apr 3, 2020, at 3:43 PM, Sven Barth > wrote: > > > > They are neither. They are simply a pointer to the first element and a > hidden size argument. For the pointer it is not important where it comes > from: a single

Re: [fpc-pascal] Why external execution so slow?

2020-03-31 Thread Sven Barth via fpc-pascal
Am 01.04.2020 um 00:22 schrieb fredvs via fpc-pascal: Does FPC come as a 64 bit release now? https://sourceforge.net/projects/freepascal/files/Win32/3.0.4/fpc-3.0.4.i386-win32.cross.x86_64-win64.exe/download Alexander meant a native Win64 release. And the answer for that is no. Regards, Sven

Re: [fpc-pascal] Range check error warning.

2020-03-25 Thread Sven Barth via fpc-pascal
Am 24.03.2020 um 01:08 schrieb fredvs via fpc-pascal: Hello. With fpc 3.3.1 there is this warning: "Warning: (4110) Range check error while evaluating constants (-193 must be between 0 and 255)" Here the code pointed by the warning: const foldhiddenbit = 7; foldhiddenmask = 1 shl

[fpc-pascal] New feature announcement: constant parameters for generics

2020-04-25 Thread Sven Barth via fpc-pascal
The Free Pascal team is happy to announce the addition of a new language feature: constant parameters for generics. This allows to declare generic types or routines that aside from type parameters can also take constant parameters that can be used inside the generic as if one would use

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Sven Barth via fpc-pascal
Arjan Adriaanse schrieb am Do., 23. Apr. 2020, 08:33: > I am new to Pascal programming and since I like using Emacs, I wanted > to try to improve its support for editing Pascal code. I decided to > implement an LSP server which text editors can use as back-end for > providing IDE features. The

Re: [fpc-pascal] Best practice porting a Windows service application to Linux?

2020-04-21 Thread Sven Barth via fpc-pascal
Bo Berglund via fpc-pascal schrieb am Mi., 22. Apr. 2020, 05:33: > But what about the general service framework? > The existing code uses a class inherited from TService, does this > exist on FPC for Windows and Linux? > So it can be crosscompiled for both platforms? > The service framework is

Re: [fpc-pascal] Question about compiling FPC trunk after revision 44849

2020-04-29 Thread Sven Barth via fpc-pascal
Jonas Maebe schrieb am Mi., 29. Apr. 2020, 19:50: > On 29/04/2020 19:39, Victor Campillo via fpc-pascal wrote: > > For years I have been using the same script to compile FPC, in this > > script I use the next command: > > > > make -j 9 clean all install > > > > After the revision 44849 the use

Re: [fpc-pascal] TFPGMap retrieving values

2020-05-01 Thread Sven Barth via fpc-pascal
Am 01.05.2020 um 16:12 schrieb Ryan Joseph via fpc-pascal: I've been starting to use the RTL so I'm not very familiar with it but I thought TFPGMap was supposed to be a hash table for fast lookup, so why does TFPSMap.Find using a binary search instead of computing a hash key and indexing into

Re: [fpc-pascal] TFPGMap retrieving values

2020-05-01 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Fr., 1. Mai 2020, 17:48: > > > > On May 1, 2020, at 10:18 PM, Sven Barth > wrote: > > > > If you need to decide which map to use I suggest you to look at this > benchmark page: http://www.benibela.de/fpc-map-benchmark_en.html You can > select various of the

Re: [fpc-pascal] TFPGMap retrieving values

2020-05-02 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Sa., 2. Mai 2020, 12:33: > > > > On May 1, 2020, at 10:18 PM, Sven Barth > wrote: > > > > It is a map. It maps keys to values. Nowhere does it say how the map is > implemented. > > > > If you need to decide which map to use I suggest you to look at this >

Re: [fpc-pascal] Name collisions in scoped enums

2020-05-03 Thread Sven Barth via fpc-pascal
Am 04.05.2020 um 05:06 schrieb Ryan Joseph via fpc-pascal: I've been using scoped enums and noticed that I'm getting collisions with reserved keywords. Shouldn't these be allowed in scoped enums since they are required to be referenced using their type name as a prefix? No, keywords have a

Re: [fpc-pascal] Empty Set in constants in generics

2020-05-04 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Mo., 4. Mai 2020, 18:48: > Should generics accept empty sets as constants? I think they should and > this is a bug but I wanted to ask first. > > > > {$mode objfpc} > > program test; > > type > TItem = (A, B, C); > TItems = set

Re: [fpc-pascal] Name collisions in scoped enums

2020-05-04 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Mo., 4. Mai 2020, 18:58: > > > > On May 4, 2020, at 2:12 PM, Michael Van Canneyt > wrote: > > > > Methods can't be keywords either, unless prefixed with &. > > > > It's not safe to change this, that's why a keyword is a keyword: it > supersedes all

Re: [fpc-pascal] Name collisions in scoped enums

2020-05-04 Thread Sven Barth via fpc-pascal
Am 05.05.2020 um 04:16 schrieb Ryan Joseph via fpc-pascal: On May 4, 2020, at 10:44 PM, Michael Van Canneyt wrote: That is how enums work by default in Pascal. If you don't force scoped enums, you can still scope them. if you use $scopedenums on then you simply force the use

Re: [fpc-pascal] Pascal Language Server

2020-04-23 Thread Sven Barth via fpc-pascal
Am 23.04.2020 um 16:28 schrieb Ryan Joseph via fpc-pascal: On Apr 23, 2020, at 9:11 PM, Arjan Adriaanse wrote: lazbuild --compiler=/usr/lib/fpc/3.2.0/ppcx64 pasls.lpi is there a macOS installer for 3.2? I found a link to a FTP server but I don't see this exists. Maybe fix that bug in trunk

Re: [fpc-pascal] Different behaviour between FPC 2.6.4 and FPC 3.0.4

2020-05-12 Thread Sven Barth via fpc-pascal
Virgo Pärna via fpc-pascal schrieb am Di., 12. Mai 2020, 08:27: > On Tue, 05 May 2020 23:03:33 +0200, Rainer Stratmann < > rainerstratm...@t-online.de> wrote: > > > > But that worked a long time (2 years or so) with FPC 2.6.4 > > > > May FPC 2.6.4 was configured to default to delphi or

Re: [fpc-pascal] please where is fpc-3.2.0rc1.arm64-linux

2020-05-17 Thread Sven Barth via fpc-pascal
Am 16.05.2020 um 11:53 schrieb Mgr. Janusz Chmiel via fpc-pascal: Dear specialists, Please is there some precompiled Linux ARM64 Binary of fpc-3.2.0rc1? Because I can only find ARM not ARM64 Bit precompiled binary. May be, that compiler is stored on some FTP site, but I have analysed

Re: [fpc-pascal] FPCMake and Makefile.fpc question

2020-05-06 Thread Sven Barth via fpc-pascal
Bart via fpc-pascal schrieb am Mi., 6. Mai 2020, 02:33: > Hi, > > Here's the first line of the Lazarus Makefile: > - > # > # Don't edit, this file is generated by FPCMake Version 2.0.0 > # > default: all > MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32

Re: [fpc-pascal] sizeof TTypeKind?

2020-03-20 Thread Sven Barth via fpc-pascal
Am 20.03.2020 um 08:32 schrieb Ryan Joseph via fpc-pascal: Are there any functions in the RTL to get the sizeof the type specified in TTypeKind? https://www.freepascal.org/docs-html/rtl/typinfo/ttypekind.html I'm truing to use record RTTI and I needed to know the size of the field in the

Re: [fpc-pascal] sizeof TTypeKind?

2020-03-21 Thread Sven Barth via fpc-pascal
Am 21.03.2020 um 08:47 schrieb Ryan Joseph via fpc-pascal: On Mar 21, 2020, at 9:39 AM, Ryan Joseph via fpc-pascal wrote: I'm going to loop through the fields of the record and get the size of each field so I can serialize the record. Am I not on the right track? No answers on this so I'm

Re: [fpc-pascal] sizeof TTypeKind?

2020-03-22 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am So., 22. März 2020, 07:28: > > > > On Mar 21, 2020, at 10:15 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > For the primitve types you need to know the sizes at compile time (e.g. >

Re: [fpc-pascal] Size of pdynarraytypeinfo

2020-03-23 Thread Sven Barth via fpc-pascal
Am 23.03.2020 um 17:49 schrieb fredvs via fpc-pascal: Some more infos: This gives the correct size with fpc <= 3.2.0: function dynarrayelesize(const typinfo: pdynarraytypeinfo): sizeint; var ti: pdynarraytypeinfo; begin ti:= typinfo;

Re: [fpc-pascal] Size of pdynarraytypeinfo

2020-03-23 Thread Sven Barth via fpc-pascal
fredvs via fpc-pascal schrieb am Mo., 23. März 2020, 22:27: > By the way, may I use this tip for fpc < 3.3.1 or is it ok only with fpc > trunk? > Yes, it will also work with older be versions - as you noticed already. ;) Regards, Sven > ___

Re: [fpc-pascal] Range check error warning.

2020-03-24 Thread Sven Barth via fpc-pascal
schrieb am Di., 24. März 2020, 18:37: > On 3/24/20 12:40 PM, fredvs via fpc-pascal wrote: > > Hello Alexander. > > > > I did: > > > > const > > foldhiddenbit : byte = 7; // line 896 > > foldhiddenmask : byte = 1 shl foldhiddenbit; // line 897 > > currentfoldhiddenbit : byte = 6; //

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-03 Thread Sven Barth via fpc-pascal
Am 03.09.2020 um 07:19 schrieb LacaK via fpc-pascal: Hi *, I would like to have source file in Windows-1250 encoding, where are stored literal strings like 'áéíóčž' in Windows-1250 encoding (I share this one file between FPC/Lazarus and Delphi 7). Windows-1250 is also ANSI code page of my

Re: [fpc-pascal] FFI or RTTI invoke for Apple arm64

2020-09-02 Thread Sven Barth via fpc-pascal
Carlo Kok via fpc-pascal schrieb am Mi., 2. Sep. 2020, 11:09: > Seems I had to use ffi.manager.pas too. However when building then it > fails with; > > Undefined symbols for architecture arm64: > > "_ffi_call", referenced from: > _FFI.MANAGER_$$_FFIINVOKE$crc7AE31AA0 in ffi.manager.o >

Re: [fpc-pascal] FFI or RTTI invoke for Apple arm64

2020-09-02 Thread Sven Barth via fpc-pascal
Carlo Kok via fpc-pascal schrieb am Mi., 2. Sep. 2020, 15:01: > On Wed, Sep 2, 2020, at 14:40, Sven Barth via fpc-pascal wrote: > > Carlo Kok via fpc-pascal schrieb am > Mi., 2. Sep. 2020, 11:09: > > > > Is there something else I need to do to allow FFI to work on ar

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-12 Thread Sven Barth via fpc-pascal
Jonas Maebe via fpc-pascal schrieb am Sa., 12. Sep. 2020, 17:47: > > All the doubts, questions, and discussions prove that current system is > > counter-intuitive and confusing. > > The issue in this thread is caused by a bug in the LCL: it blindly > assumes that the dynamic code page of the

Re: [fpc-pascal] String literals and code page of .pas source file

2020-09-08 Thread Sven Barth via fpc-pascal
Mattias Gaertner via fpc-pascal schrieb am Di., 8. Sep. 2020, 22:32: > On Tue, 8 Sep 2020 20:27:20 +0200 > Jonas Maebe via fpc-pascal wrote: > > > On 07/09/2020 08:51, LacaK via fpc-pascal wrote: > > > > > attached simple Lazarus compilable project (one Form). > > > > > > ... > > > type > > >

Re: [fpc-pascal] TFPObjectlist example

2020-09-08 Thread Sven Barth via fpc-pascal
James Richters via fpc-pascal schrieb am Di., 8. Sep. 2020, 20:07: > What’s the difference between TList and TFPGList? Which one is better > for this example? > The main difference is that TFPGList ist a generic, thus when you specialize it with your record you'll have a typesafe object where

Re: [fpc-pascal] Dynamic Arrays in Procedures

2020-10-05 Thread Sven Barth via fpc-pascal
James Richters via fpc-pascal schrieb am So., 4. Okt. 2020, 23:44: > So it does... > > I should have tested my own example. I found my problem, I declared it > as Var and it would only work with variables due to that > That's just a normal open array parameter and worked this way for a long

Re: [fpc-pascal] FPC coding standards

2020-08-18 Thread Sven Barth via fpc-pascal
Dwight Schauer via fpc-pascal schrieb am Di., 18. Aug. 2020, 08:45: > > The default config generated by ptop definitely does not conform to > the standards... > There is no default configuration, because there is not one default standard. While some things are a given (lowercase identifiers, no

Re: [fpc-pascal] FPC coding standards

2020-08-18 Thread Sven Barth via fpc-pascal
Dwight Schauer via fpc-pascal schrieb am Di., 18. Aug. 2020, 13:55: > Is there a more robust code reformatter (command line / batch oriented) > that can used with free pascal? (before I start digging in to making > ptop work to remove one's focus from style and put it solely on > content?) >

Re: [fpc-pascal] FPC coding standards

2020-08-18 Thread Sven Barth via fpc-pascal
Dwight Schauer via fpc-pascal schrieb am Di., 18. Aug. 2020, 20:38: > On Tue, 2020-08-18 at 14:11 +0200, Sven Barth wrote: > > Not that I know. Most formatters will barf on some of the syntax > > extensions that FPC provides (see the Jedi Code Formatter that barfs > > on generic syntax). Even

Re: [fpc-pascal] Regression in 3.2.0 ??

2020-08-19 Thread Sven Barth via fpc-pascal
Peter via fpc-pascal schrieb am Mi., 19. Aug. 2020, 08:17: > Has anyone any ideas to fix it? It compiles if I change stdcall to > CDecl, but I have no idea if that is a valid fix. > (More info; see bug 37566) > Using the same ifdef as in the interface is the correct fix. The compiler now more

Re: [fpc-pascal] FFI or RTTI invoke for Apple arm64

2020-08-19 Thread Sven Barth via fpc-pascal
Carlo Kok via fpc-pascal schrieb am Mi., 19. Aug. 2020, 13:17: > Hi, > > for PascalScript FFI support, are there plans to support RTTI .Invoke, or > any form of FFI available to do dynamic invoke from Pascalscript to FPC/api > code? > Rtti.Invoke is available in 3.2.0 however for all platforms

Re: [fpc-pascal] Procedural generics question

2020-08-26 Thread Sven Barth via fpc-pascal
Am 26.08.2020 um 14:59 schrieb Ryan Joseph via fpc-pascal: On Aug 26, 2020, at 5:44 PM, Nico Neumann via fpc-pascal wrote: generic procedure Add; begin if GetTypeKind(T) = tkInteger then WriteLn('an integer'); if GetTypeKind(T) = tkString then WriteLn('a string'); end; Question

Re: [fpc-pascal] Procedural generics question

2020-08-26 Thread Sven Barth via fpc-pascal
Am 25.08.2020 um 23:47 schrieb Benito van der Zander via fpc-pascal: Hi, that is generating rather odd code (r40721) project1.lpr:9    begin 00401090 55   push   %rbp 00401091 4889e5   mov    %rsp,%rbp 00401094

Re: [fpc-pascal] Can't build FPC 3.2.1

2020-08-27 Thread Sven Barth via fpc-pascal
Am 27.08.2020 um 21:45 schrieb Marcelo Rocha via fpc-pascal: Hi all, I have downloaded fpc 3.2.0 linux x64 installer, and builded fpc's branch fixes_3_2 using it.. When I run the command make install, I've got the following errors: make[3]: Entering directory '/root/fixes_3_2/compiler'

Re: [fpc-pascal] How reliable are Hashlists in Contnrs

2020-08-24 Thread Sven Barth via fpc-pascal
Am 24.08.2020 um 21:01 schrieb Lars via fpc-pascal: I've noticed some problem with another hashlist that after adding about 2000 items to it, it starts to have problems. There are duplicates added (possibly a collision?) Is there a such thing as a perfect hashlist which never has a

Re: [fpc-pascal] Difference between Associative array and Hashlist?

2020-08-24 Thread Sven Barth via fpc-pascal
Am 24.08.2020 um 21:47 schrieb Lars via fpc-pascal: Since FPC has no associative array I was thinking that the closest is TStringList with name/value pairs. Then there is a hashlist in contnrs. Maybe an associative array means you don't have to implement it using hashes in order for it to

Re: [fpc-pascal] Cross platform question about lpi file content

2020-09-27 Thread Sven Barth via fpc-pascal
Bo Berglund via fpc-pascal schrieb am So., 27. Sep. 2020, 18:12: > I am trying to find the cause of a linker error when building my > application on Linux. > While doing this I looked in the project file projname.lpi and found > this strange entry: > > > > > > > > Why is the path

Re: [fpc-pascal] basic question on begin, end;

2020-09-23 Thread Sven Barth via fpc-pascal
Am 22.09.2020 um 14:46 schrieb dano none via fpc-pascal: end; my_base := my_base + 15; writeln('current base ',my_base:2); ch := ReadKey; { end; { end i = column indexer }} The bottom three statements will only be executed as part of the

Re: [fpc-pascal] Cross platform question about lpi file content

2020-09-30 Thread Sven Barth via fpc-pascal
Am 27.09.2020 um 22:07 schrieb Bo Berglund via fpc-pascal: On Sun, 27 Sep 2020 19:44:36 +0200, Sven Barth via fpc-pascal wrote: I am not using wsmenus... Yes, you are, even if it is indirectly. Otherwise the compiler or linker wouldn't complain about it. It would be very good

Re: [fpc-pascal] Merging units

2020-10-02 Thread Sven Barth via fpc-pascal
Am 02.10.2020 um 19:55 schrieb Ryan Joseph via fpc-pascal: Any ideas of solutions or preferred approaches? Is it feasible to add an "imports" clause to Pascal or are there other pitfalls? The preferred solutions are indeed either to put everything in one unit (includes or not) or to have the

Re: [fpc-pascal] TFPGList and objects

2020-05-28 Thread Sven Barth via fpc-pascal
Am 28.05.2020 um 19:36 schrieb Vojtěch Čihák via fpc-pascal: There is TFPGObjectList for objects. Ryan is talking about TP style objects. BTW, is FGL a good choice for generics? Some time ago Marco wrote here that FGL is moreless a technology demonstrator and Generics.Collection or other

Re: [fpc-pascal] 3.2.0 Invalid PPU Version

2020-08-12 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Mi., 12. Aug. 2020, 10:30: > Does anyone have any idea how this happened? I installed 3.2.0 from an > installer so why is the PPU version wrong? > > PPU Loading > /usr/local/lib/fpc/3.2.0/units/x86_64-darwin/fcl-process/process.ppu > PPU Invalid Version 208

Re: [fpc-pascal] RTL semaphore supported?

2020-08-12 Thread Sven Barth via fpc-pascal
Am 13.08.2020 um 06:36 schrieb Ryan Joseph via fpc-pascal: Are semaphores actually supported in the RTL? I don't see they're available on macOS (compiling with trunk even). https://www.freepascal.org/docs-html/3.0.0/rtl/system/semaphoreinit.html No, these functions where there only

Re: [fpc-pascal] Resource compilation

2020-08-12 Thread Sven Barth via fpc-pascal
Am 13.01.2019 um 18:38 schrieb Martok: Update time! [snip] All of windres's tests pass now, except for the Dialog related ones. I would consider it more or less finished. Any more things to do? Otherwise, I'll stack it into

[fpc-pascal] fpcres now supports compilation of RC files

2020-08-12 Thread Sven Barth via fpc-pascal
Hello together! Thanks to the work of Martok the fpcres utility is now able to compile RC files into RES files. To compile an RC file to a RES file you need to pass the "-of res" argument as otherwise the RC reader won't be used (it's a "catch all" TResourceReader descendant and thus not

<    3   4   5   6   7   8   9   10   11   12   >