Re: [fpc-pascal] Passing a CORBA interface as parameter

2019-12-21 Thread Sven Barth via fpc-pascal
Am 21.12.2019 um 16:12 schrieb Adriaan van Os: Sven Barth via fpc-pascal wrote: The important difference in this regard between COM and CORBA interfaces is that for CORBA interfaces the "guid" is a ShortString, not a TGUID. Thus the compiler allows to convert a CORBA inter

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

2019-12-21 Thread Sven Barth via fpc-pascal
Am 21.12.2019 um 16:49 schrieb Adriaan van Os: Section 7.4 Interface delegation of the FPC Language Reference Guide discusses interface delegates and the implements property specifier. For example $interfaces corba

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

2019-12-22 Thread Sven Barth via fpc-pascal
Am 22.12.2019 um 04:44 schrieb Ryan Joseph via fpc-pascal: On Dec 21, 2019, at 10:49 AM, Adriaan van Os wrote: I had hoped that procedure IMyInterface2.P2 would now be visible as a method of TMyClass. This would be quite helpful in implementing multiple-inheritance. But no, the implements s

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

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-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 I

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 at

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 ex

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 > procedur

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

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. Indee

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, syste

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

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; > > t

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 w

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 e

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] 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 when

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 >> > -Fu..

Re: [fpc-pascal] FreeVision Resources?

2020-02-13 Thread Sven Barth via fpc-pascal
Kevin Monceaux schrieb am Do., 13. Feb. 2020, 10:57: > Pascal Fans, > > I've recently started getting reacquainted with Pascal. I learned a bit of > it back in the late '80s in college on a VAX 11/750 running DEC VMS. I've > loved PascalCase ever since. > > I'm working my way through the Turbo

Re: [fpc-pascal] OpenCV

2020-02-13 Thread Sven Barth via fpc-pascal
Adriaan van Os schrieb am Do., 13. Feb. 2020, 14:26: > > I looked around on the web for OpenCV Pascal bindings. What I found, seems > to be based (mostly) on > the OpenCV C interfaces, which covers only part of OpenCV. > > Alternatives are: > > 1. Write flat C++ wrappers by hand > > 2. Hook

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 co

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 days.

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 applicati

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] Extended type under Win64

2020-02-26 Thread Sven Barth via fpc-pascal
denisgolovan via fpc-pascal schrieb am Di., 25. Feb. 2020, 23:01: > Hi all > > I'm trying to get an idea if Extended float is/can actually be 80bit? > I have FPC built under Linux x64 and it works fine (co-processor command > are actually used). > > But I haven't found any reliable information ab

Re: [fpc-pascal] Extended type under Win64

2020-02-26 Thread Sven Barth via fpc-pascal
denisgolovan schrieb am Mi., 26. Feb. 2020, 11:38: > > > > The Extended type is not available for x86_64-win64. You either need to > use Double or the software floating point support in unit sfpux80 (though > that is only available in 3.2 and newer). > > So, Linux x64 having hardware Extended sup

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 me

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 download.htm

Re: [fpc-pascal] Cannot find system type "__m64"

2020-03-05 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Fr., 6. März 2020, 06:57: > I'm continuing this from the bug tracker. Also please note that for some > reason the mail list server has stopped sending me replies to gmail so I > need to look at https://lists.freepascal.org/pipermail/fpc-pascal/ for > replies

Re: [fpc-pascal] Cannot find system type "__m64"

2020-03-05 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Fr., 6. März 2020, 06:57: > I'm continuing this from the bug tracker. Also please note that for some > reason the mail list server has stopped sending me replies to gmail so I > need to look at https://lists.freepascal.org/pipermail/fpc-pascal/ for > replies

Re: [fpc-pascal] Cannot find system type "__m64"

2020-03-06 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Fr., 6. März 2020, 16:12: > > > > On Mar 6, 2020, at 2:04 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Yes, that is the problem. When Florian had merged the SIMD intriniscs > branc

Re: [fpc-pascal] Cannot find system type "__m64"

2020-03-06 Thread Sven Barth via fpc-pascal
schrieb am Fr., 6. März 2020, 15:51: > On 3/6/20 9:17 AM, Ryan Joseph via fpc-pascal wrote: > > Ok, I got this reply finally so maybe something else went wrong. I'm > tempting > > to try another account with some free email service because Gmail never > shows > > my initial post, which is annoyin

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, it's

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): > > - https://bugs.freepascal.org/

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() funct

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 str

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] 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, deLayoutChange,

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 co

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 f

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 := 1,

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 arch

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 Integer

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 in

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 recor

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 t

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. > Size

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; inc(pointer(ti),ord(pdynarraytypeinfo(ti)^.namelen)+2);

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 > ___ fpc-pasca

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; // li

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

2020-03-24 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 foldhidd

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 setup... &

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] 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] 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 direct

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 ele

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 hea

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] About fpc license.

2020-04-09 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 uni

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 o

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 w

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 examp

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 rig

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. J

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 been

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

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

2020-04-20 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] 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 a

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] 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

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

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 of

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 > be

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 hi

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 identifie

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 of

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 instea

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

2020-05-05 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 i

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 tp

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 ftp.freepas

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 l

Re: [fpc-pascal] FPC 3.2.0 released!

2020-06-22 Thread Sven Barth via fpc-pascal
Anthony Walter via fpc-pascal schrieb am Mo., 22. Juni 2020, 06:29: > Great news and thank you to all the developers! I carefully read through > the notes and look forward to using the new array methods and also the > management operators. > > One question to everyone though, what use cases do yo

Re: [fpc-pascal] how to make this tp7 code work on fpc

2020-06-27 Thread Sven Barth via fpc-pascal
Am 27.06.2020 um 04:09 schrieb Travis Siegel: I'm porting some code from tp7 to fpc, and I'm running into an error I don't know how to fix.  The comments claim it's supposed to be a hash table, but to me, it looks more like labels tied to various arrays.   Ofs_00_02: Word = Ofs (Ofs_00_01);  

Re: [fpc-pascal] fpc-pascal Digest, Vol 193, Issue 2

2020-07-03 Thread Sven Barth via fpc-pascal
Can it be that you replied to the wrong message? ;) (see below) Regards, Sven schrieb am Fr., 3. Juli 2020, 14:10: > Montag ab 12.00? > > > DETLEF D. OVERBEEK > WITH KIND REGARDS, MED VENLIG HILSEN, MET VRIENDELIJKE GROET, > CORDIALEMENT, CORDIALI SALUTI, > LE SALUDA ATENTAMENTE, MIT FREUNDLIC

Re: [fpc-pascal] FPC for Win64

2020-07-05 Thread Sven Barth via fpc-pascal
Florian Klämpfl schrieb am So., 5. Juli 2020, 09:22: > Am 05.07.20 um 09:04 schrieb Jonas Maebe: > > On 2020-07-02 22:30, Evert van Dijken via fpc-pascal wrote: > > > >> I like to use the 64 bits FPC compiler, but I cannot find any > >> documentation how to use it. I see a WIN32 compiler and a WI

Re: [fpc-pascal] TProcessUTF8 doc - 2

2020-07-06 Thread Sven Barth via fpc-pascal
Am 06.07.2020 um 23:38 schrieb Alexey Tor. via fpc-pascal: a) https://lazarus-ccr.sourceforge.io/docs/lazutils/utf8process/tprocessutf8.html here we have 2-3 items depre - ApplicationName, CommandLine. but list shows no special mark. confusing. it shows [rw] marks, pls add near the [deprec

Re: [fpc-pascal] TProcess.CurrentDirectory doc

2020-07-06 Thread Sven Barth via fpc-pascal
Am 06.07.2020 um 23:31 schrieb Alexey Tor. via fpc-pascal: https://lazarus-ccr.sourceforge.io/docs/fcl/process/tprocess.currentdirectory.html CurrentDirectory specifies the working directory of the newly started process.Changing this property after the process was started has no effect. nee

Re: [fpc-pascal] TProcess.CurrentDirectory doc

2020-07-06 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am Di., 7. Juli 2020, 07:44: > > > On Tue, 7 Jul 2020, Sven Barth via fpc-pascal wrote: > > > Am 06.07.2020 um 23:31 schrieb Alexey Tor. via fpc-pascal: > >> > >> > https://lazarus-ccr.sourceforge.io/docs/fcl

Re: [fpc-pascal] fpDebug function-call proof-of-concept

2020-07-07 Thread Sven Barth via fpc-pascal
Joost van der Sluis schrieb am Di., 7. Juli 2020, 11:17: > Hi all, > > Last weekend I started on the ability to evaluate functions within > fpDebug. And I got quite far. It is a proof-of-concept, still needs a > lot of work. But it works! > > See it in action here: > > http://amira.cnoc.nl/fpc/Fp

Re: [fpc-pascal] fpc-pascal Digest, Vol 193, Issue 2

2020-07-07 Thread Sven Barth via fpc-pascal
Tomas Hajny schrieb am Di., 7. Juli 2020, 14:33: > On 2020-07-03 18:44, Sven Barth via fpc-pascal wrote: > > Can it be that you replied to the wrong > > message? ;) (see below) > > I suspect that it was an automated reply (out-of-office message). :/ > Ceterum censeo a

Re: [fpc-pascal] LongInt and LongWord types

2020-07-08 Thread Sven Barth via fpc-pascal
Am 08.07.2020 um 23:00 schrieb Marcelo Rocha via fpc-pascal: Delphi's LongInt and LongWord are 32 bits on Windows, but 64 bits on supported Posix platforms(http://docwiki.embarcadero.com/RADStudio/Rio/en/Simple_Types_(Delphi)), following the conventions from LP64/LLP64. FreePascal declares with

Re: [fpc-pascal] What happens when assigning interfaces?

2020-07-09 Thread Sven Barth via fpc-pascal
Am 09.07.2020 um 14:31 schrieb Ryan Joseph via fpc-pascal: Given the code below and the 2 cases can anyone explain what exactly the compiler does when the interfaces are assigned to? Does it copy a record like structure, call some internal functions, do runtime checks? I'm curious if they're d

Re: [fpc-pascal] Writeln() behaves differently on Windows and Linux, why?

2020-07-09 Thread Sven Barth via fpc-pascal
Am 09.07.2020 um 18:42 schrieb Bo Berglund via fpc-pascal: On Thu, 9 Jul 2020 16:25:50 +, Alexander Grotewohl wrote: it sounds like your terminal has gotten fudged somehow I am using crt in the lpr file just for the sake of being able to shut it down sensibly: It doesn't matter where t

Re: [fpc-pascal] What happens when assigning interfaces?

2020-07-09 Thread Sven Barth via fpc-pascal
Am 10.07.2020 um 03:02 schrieb Ryan Joseph via fpc-pascal: On Jul 10, 2020, at 12:23 AM, Sven Barth via fpc-pascal wrote: (so that it points to the VMT generated for the interface) So, it sounds like what the interface actually is, is a pointer to VMT table. Correct. The VMT is

Re: [fpc-pascal] What happens when assigning interfaces?

2020-07-10 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Fr., 10. Juli 2020, 12:04: > > > > On Jul 10, 2020, at 12:31 PM, Sven Barth > wrote: > > > > A lookup is only necessary if you use e.g. "SomeClass as SomeIntf". > > so if I do: > > DoSomething(c as IFoo); > > then Supports() is called at runtime to return th

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