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

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

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

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

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

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

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

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

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

2019-12-21 Thread Sven Barth via fpc-pascal
Am 20.12.2019 um 16:17 schrieb Adriaan van Os: I would like to pass a CORBA interface-type as parameter and test for equality, So, for example, I have {$mode objfpc} {$interfaces corba} type IMyInterface = Interface     [  '{34aad6d0-5884-4143-97c2-b6e330305ae3}']     Function

Re: [fpc-pascal] Two possible generics bugs

2019-12-02 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Mo., 2. Dez. 2019, 14:01: > > > > On Nov 30, 2019, at 12:58 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > This can't work. ClassType is of type TClass and TClass.Create calls > TObject.C

Re: [fpc-pascal] Two possible generics bugs

2019-12-02 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am So., 1. Dez. 2019, 23:11: > > > > On Nov 30, 2019, at 1:04 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Well, if you want you can find any place where the _SPECIALIZE and > _GENERIC

Re: [fpc-pascal] Two possible generics bugs

2019-11-30 Thread Sven Barth via fpc-pascal
Am 29.11.2019 um 22:56 schrieb Ryan Joseph via fpc-pascal: On Nov 29, 2019, at 2:00 AM, Sven Barth via fpc-pascal wrote: Why? It does say that a class type is expected. And the column of the error should point to the correct location. That's the same error you'd get when specializing

Re: [fpc-pascal] Two possible generics bugs

2019-11-30 Thread Sven Barth via fpc-pascal
Am 30.11.2019 um 18:56 schrieb Florian Klämpfl: Am 30.11.19 um 18:51 schrieb Sven Barth via fpc-pascal: Am 28.11.2019 um 16:14 schrieb Ryan Joseph via fpc-pascal: {$mode objfpc} program test; uses    FGL; // Type identifier expected // Internal error 2019112401 generic function CopyList

Re: [fpc-pascal] Two possible generics bugs

2019-11-30 Thread Sven Barth via fpc-pascal
Am 29.11.2019 um 01:01 schrieb Ryan Joseph via fpc-pascal: function CopyList (source: TFPSList): TFPSList; begin result := TFPSList(source.ClassType.Create); result.Assign(source); end; This can't work. ClassType is of type TClass and TClass.Create calls TObject.Create, *not* the

Re: [fpc-pascal] Two possible generics bugs

2019-11-30 Thread Sven Barth via fpc-pascal
Am 28.11.2019 um 16:14 schrieb Ryan Joseph via fpc-pascal: {$mode objfpc} program test; uses FGL; // Type identifier expected // Internal error 2019112401 generic function CopyList(source: specialize FGL.TFPGObjectList): specialize FGL.TFPGObjectList; begin end; begin end. What option

Re: [fpc-pascal] Two possible generics bugs

2019-11-28 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Fr., 29. Nov. 2019, 01:11: > > > > On Nov 28, 2019, at 6:38 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > TFPGObjectList has a constraint to class types, so you need to constrai

Re: [fpc-pascal] Two possible generics bugs

2019-11-28 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Do., 28. Nov. 2019, 20:36: > Testing on 3.3.1. Are these both bugs? I wanted to ask first before filing > a report. > > {$mode objfpc} > > program test; > uses > FGL; > > // No Error specializing TFPGList in parameter list... > generic function

Re: [fpc-pascal] Pre-allocated TFPGList or similar

2019-11-24 Thread Sven Barth via fpc-pascal
Am 24.11.2019 um 10:14 schrieb Michael Van Canneyt: On Sun, 24 Nov 2019, Sven Barth via fpc-pascal wrote: Am 23.11.2019 um 23:42 schrieb Ryan Joseph via fpc-pascal: I need a pre-grown list which I can put (not insert!) items into at indexes without getting "List index out of bounds&qu

Re: [fpc-pascal] Pre-allocated TFPGList or similar

2019-11-24 Thread Sven Barth via fpc-pascal
Am 23.11.2019 um 23:42 schrieb Ryan Joseph via fpc-pascal: I need a pre-grown list which I can put (not insert!) items into at indexes without getting "List index out of bounds" errors. For example I want to start with a list that has 10 empty indexes: list := TList.Create(10); // 10 empty

Re: [fpc-pascal] get_caller_frame

2019-11-21 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Fr., 22. Nov. 2019, 01:51: > > > > On Nov 21, 2019, at 1:41 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > No. On x86 it's essentially the content of the EBP/RBP register which is >

Re: [fpc-pascal] get_caller_frame

2019-11-20 Thread Sven Barth via fpc-pascal
Am 20.11.2019 um 23:52 schrieb Ryan Joseph via fpc-pascal: On Nov 20, 2019, at 1:56 AM, Sven Barth via fpc-pascal wrote: It returns the address of the caller's frame pointer. See also https://www.freepascal.org/docs-html/rtl/system/get_caller_frame.html It's mainly used in context

Re: [fpc-pascal] get_caller_frame

2019-11-19 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Mi., 20. Nov. 2019, 04:36: > I came across get_caller_frame in some unrelated code and I was just > curious about this so I wanted to ask. > > What does get_caller_frame return exactly? Is this a pointer to a stack > frame that could be copied to the heap?

Re: [fpc-pascal] Generics in Objective-C mode bug?

2019-11-11 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Mo., 11. Nov. 2019, 19:21: > Is this a bug I should report? Knowing what I do about generics now I > think the type check needs to be suspended until the type is actually > specialized. > Generics are not considered supported with Objective Pascal types.

Re: [fpc-pascal] Generic type conflicts

2019-11-10 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am So., 10. Nov. 2019, 02:11: > > > > On Nov 7, 2019, at 12:28 PM, Ben Grasset via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > {$IF GetTypeKind(T) in [tkInteger, tkInt64, tkQWord]} > > Result := A div B > > {$ELSEIF GetTypeKind(T) =

Re: [fpc-pascal] Generic operator overload problem

2019-11-08 Thread Sven Barth via fpc-pascal
Am 02.11.2019 um 15:01 schrieb Ryan Joseph via fpc-pascal: Is this a bug or did I do something wrong? The minus operator overload seems to be getting confused and I get a "Can't determine which overloaded function to call" error as a result. {$mode objfpc} {$modeswitch advancedrecords}

Re: [fpc-pascal] Generic type conflicts

2019-11-08 Thread Sven Barth via fpc-pascal
Am 02.11.2019 um 15:55 schrieb Ryan Joseph via fpc-pascal: I've wanted to make a generic version of a vector for a while but I always give up because it seems not very possible. It's probably not even a great idea because many methods don't translate between float and integer but I wanted to

Re: [fpc-pascal] Generic type conflicts

2019-11-07 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am Do., 7. Nov. 2019, 16:23: > > > On Thu, 7 Nov 2019, Ben Grasset via fpc-pascal wrote: > > > On Thu, Nov 7, 2019 at 3:03 AM Sven Barth via fpc-pascal < > > fpc-pascal@lists.freepascal.org> wrote: > > > >> If there i

Re: [fpc-pascal] Generic type conflicts

2019-11-07 Thread Sven Barth via fpc-pascal
Am 07.11.2019 um 01:33 schrieb Ben Grasset via fpc-pascal: On Wed, Nov 6, 2019 at 12:44 PM Sven Barth via fpc-pascal <mailto:fpc-pascal@lists.freepascal.org>> wrote: Pascal has a strong type safety, thus something like the if-expression won't be used/allowed

Re: [fpc-pascal] Generic type conflicts

2019-11-06 Thread Sven Barth via fpc-pascal
Am 07.11.2019 um 01:42 schrieb Ben Grasset via fpc-pascal: On Wed, Nov 6, 2019 at 7:33 PM Ben Grasset > wrote: Encouraging typecasting (which cares only about the sizes of the types involved, nothing else) at the programmer level is far more error-prone

Re: [fpc-pascal] Generic type conflicts

2019-11-06 Thread Sven Barth via fpc-pascal
Ben Grasset via fpc-pascal schrieb am Mi., 6. Nov. 2019, 15:43: > On Wed, Nov 6, 2019 at 2:01 AM Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > >> A normal if-statements has the same non-evaluation. >> > > Not in the way I m

Re: [fpc-pascal] Generic type conflicts

2019-11-05 Thread Sven Barth via fpc-pascal
Ben Grasset via fpc-pascal schrieb am Mi., 6. Nov. 2019, 04:49: > On Tue, Nov 5, 2019 at 5:24 PM Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > >> Does this really work? Cause the compiler should nevertheless typecheck >> the code in the ot

Re: [fpc-pascal] Generic type conflicts

2019-11-05 Thread Sven Barth via fpc-pascal
Ben Grasset via fpc-pascal schrieb am Di., 5. Nov. 2019, 19:11: > On Sat, Nov 2, 2019 at 11:51 AM Ryan Joseph via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > >> Are there any solutions for this currently? I feel like generics need to >> support some compiler directives so different

Re: [fpc-pascal] FPC cannot understand 1-char string as PChar

2019-11-04 Thread Sven Barth via fpc-pascal
AlexeyT via fpc-pascal schrieb am Mo., 4. Nov. 2019, 23:40: > FPC 3.3.1-r43022 [2019/09/16] for Linux x64. This code crashes, because > fpc sees 'x', 'y' wrong: > >Py_BuildValue('{sLsisisisisisisOsOsOsisisisisisO}', > 'tag', > Mark.Tag, > 'x', > Mark.PosX, > 'y', >

Re: [fpc-pascal] fpbind ipv6 version

2019-10-28 Thread Sven Barth via fpc-pascal
Am 28.10.2019 um 00:24 schrieb wkitt...@windstream.net: On 10/27/19 6:23 PM, Sven Barth via fpc-pascal wrote: schrieb am So., 27. Okt. 2019, 19:32:     On 10/27/19 11:56 AM, Alexander Grotewohl wrote: > const >      IN6ADDR_ANY: array[0..3] of longint = (0, 0, 0, 0);   

Re: [fpc-pascal] fpbind ipv6 version

2019-10-27 Thread Sven Barth via fpc-pascal
schrieb am So., 27. Okt. 2019, 19:32: > On 10/27/19 11:56 AM, Alexander Grotewohl wrote: > > I sent this direct to him on accident but I don't think it worked > anyways > > (bounced?) > > > > Just some test code so not very pretty. It works, but IN6ADDR_ANY was > missing > > and I'm not familiar

Re: [fpc-pascal] Dynamic loading to static?

2019-10-26 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Sa., 26. Okt. 2019, 22:46: > > > > On Oct 26, 2019, at 12:55 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > tmpenum := y.GetEnumerator; > > while tmpenum.MoveNext do begin > > x := tmp

Re: [fpc-pascal] Dynamic loading to static?

2019-10-26 Thread Sven Barth via fpc-pascal
Am 26.10.2019 um 14:56 schrieb Ryan Joseph: On Oct 26, 2019, at 4:26 AM, Sven Barth via fpc-pascal wrote: CodePointer(Py_Initialize) := GetProcAddress(handle, 'Py_Initialize'); Thanks that works. I don’t think I’ve ever cast a left side value before in Pascal and honestly I didn’t think

Re: [fpc-pascal] Dynamic loading to static?

2019-10-26 Thread Sven Barth via fpc-pascal
Am 25.10.2019 um 20:49 schrieb Ryan Joseph: On Oct 25, 2019, at 12:02 PM, Michael Van Canneyt wrote: You need to manually change them. if you look in the packages, you'll see that many library import units exist in 2 flavours. One static, one dynamic. That’s what I was afraid of. btw, I

Re: [fpc-pascal] FPC Mantis has 2 fields "fixed in revision" in issues

2019-10-21 Thread Sven Barth via fpc-pascal
AlexeyT schrieb am Mo., 21. Okt. 2019, 17:24: > First field is below the "OS" and "Product build" on the top; 2nd is > below "Attach tags". Remove 1 of them. > > https://bugs.freepascal.org/view.php?id=35400 No, they are different (they are even named differently!). The revision at the top is

Re: [fpc-pascal] fcl-passrc errors

2019-10-15 Thread Sven Barth via fpc-pascal
Am 15.10.2019 um 23:46 schrieb Ryan Joseph: On Oct 15, 2019, at 5:26 PM, Benito van der Zander wrote: you could do var it: pointer; obj: TObject absolute it; begin for it in list do begin // continue on like before using “obj” instead of “it" end; That is a

Re: [fpc-pascal] fcl-passrc errors

2019-10-14 Thread Sven Barth via fpc-pascal
Mattias Gaertner via fpc-pascal schrieb am Mo., 14. Okt. 2019, 10:39: > On Mon, 14 Oct 2019 07:37:38 +0200 > Sven Barth via fpc-pascal wrote: > > >[...] > > Because the iterator returns a Pointer and not whatever you think it > > might return. If you know it

Re: [fpc-pascal] FPC_CURRENCY_IS_INT64

2019-10-14 Thread Sven Barth via fpc-pascal
LacaK schrieb am Mo., 14. Okt. 2019, 11:08: > Hi, > > what is the meaning of this compiler define? > I am expecting, that Currency datatype is internaly stored using Int64 > datatype (*1). > This compiler define is set for Win64, but not for Win32. > Does it means, that on Win32 there is

Re: [fpc-pascal] fcl-passrc errors

2019-10-13 Thread Sven Barth via fpc-pascal
Am 13.10.2019 um 23:19 schrieb Ryan Joseph: On Oct 13, 2019, at 11:11 AM, Sven Barth via fpc-pascal wrote: Then specialize the list with the correct type. This issue *will* be fixed and is not up to discussion. Here’s some code from the parser today. TFPList is being used because it’s

Re: [fpc-pascal] fcl-passrc errors

2019-10-13 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am So., 13. Okt. 2019, 16:22: > > > > On Oct 13, 2019, at 5:58 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > >> Delphi does not allow it: > >> > >> [dcc32 Error] Project1.dpr(18):

Re: [fpc-pascal] fcl-passrc errors

2019-10-13 Thread Sven Barth via fpc-pascal
Am 13.10.2019 um 11:26 schrieb Michael Van Canneyt: On Sun, 13 Oct 2019, Sven Barth via fpc-pascal wrote: Just type casting because the array is an array of pointers. I get these errors otherwise "Incompatible types: got "Pointer" expected “TEntity"”. I could use a prop

Re: [fpc-pascal] fcl-passrc errors

2019-10-13 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am So., 13. Okt. 2019, 08:20: > > 2) For..in loops > > > > EParserError: Expected := or in at token "(" in file > > > > /Users/ryanjoseph/Developer/Projects/FPC/NewEngine/Sources/Examples/EmptyWindow.pas > at line 138 column > >

Re: [fpc-pascal] generic proc inference

2019-10-10 Thread Sven Barth via fpc-pascal
Am 10.10.2019 um 22:41 schrieb Ryan Joseph: On Oct 9, 2019, at 6:21 PM, Sven Barth via fpc-pascal wrote: Hmmm, I thought letting that dummy sym pass through would have lots of adverse affects in various places. I’ll have to study this later in the debugger. In that case the necessary

Re: [fpc-pascal] generic proc inference

2019-10-09 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Mi., 9. Okt. 2019, 22:53: > > > > On Oct 9, 2019, at 1:51 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Yes, exactly that. It could also be that the parser picks up a non > generic overload from ano

Re: [fpc-pascal] Compatibility problems with fpc > 3.3.1 rev 42375

2019-10-09 Thread Sven Barth via fpc-pascal
fredvs schrieb am Fr., 6. Sep. 2019, 22:23: > Hello everybody (included Sven). > > It seems that the problems come from > /mseide-msegui/lib/common/fpccompatibility/mclasses.pas. > > In procedure TReader.ReadPropValue(Instance: TPersistent; PropInfo: > Pointer), IMHO there is something not

Re: [fpc-pascal] Compatibility problems with fpc > 3.3.1 rev 42375

2019-10-09 Thread Sven Barth via fpc-pascal
fredvs schrieb am Mi., 9. Okt. 2019, 12:00: > Could it be possible to simplify the life of rtl-users and add methods with > same parameters as previous version and make it compatible with new > features? > Working with the RTTI simply is *not* simple, because you're interfacing with binary data

Re: [fpc-pascal] generic proc inference

2019-10-08 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Di., 8. Okt. 2019, 23:00: > > > > On Oct 8, 2019, at 11:32 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > I checked again. The thing is that in the compiler overload handling is > done inside htypechk

Re: [fpc-pascal] generic proc inference

2019-10-08 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Fr., 4. Okt. 2019, 17:10: > > > > On Oct 3, 2019, at 6:07 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > A patch for it by Ryan Joseph exists ( > https://bugs.freepascal.org/view.php?id=35261 ), but I'v

Re: [fpc-pascal] generic proc inference

2019-10-07 Thread Sven Barth via fpc-pascal
Mattias Gaertner via fpc-pascal schrieb am Mo., 7. Okt. 2019, 18:42: > On Mon, 7 Oct 2019 12:38:51 -0400 > Ryan Joseph wrote: > > > > On Oct 7, 2019, at 10:19 AM, Mattias Gaertner via fpc-pascal > > > wrote: > > > > > > Note that in Delphi the "non-generic-wins" rule is per parameter: > > > >

Re: [fpc-pascal] generic proc inference

2019-10-07 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Mo., 7. Okt. 2019, 15:51: > That bug aside the rule is that non-generic overloads always win over > generics. I remember this was discussed at length if we can find the old > thread. > Here: https://lists.freepascal.org/pipermail/fpc-pascal/2018-December/055225.html

Re: [fpc-pascal] generic proc inference

2019-10-07 Thread Sven Barth via fpc-pascal
Mattias Gaertner schrieb am Mo., 7. Okt. 2019, 11:59: > On Mon, 7 Oct 2019 07:54:51 +0200 > Sven Barth via fpc-pascal wrote: > > > Ryan Joseph schrieb am Mo., 7. Okt. 2019, > > 00:16: > >[...] > > > >>> 3. > > > >>> timpfuncsp

Re: [fpc-pascal] generic proc inference

2019-10-06 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Mo., 7. Okt. 2019, 00:16: > > > > >>> 3. > >>> timpfuncspez2.pp > >>> DoThis > >>> DoThis > >>> Delphi gives an error "Ambiguous call to DoThis". FPC silently > >>> selects the one with only one param. IMO this is dangerous, it > >>> should give an error. > > > > generic

Re: [fpc-pascal] generic proc inference

2019-10-04 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Fr., 4. Okt. 2019, 17:10: > > > > On Oct 3, 2019, at 6:07 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > A patch for it by Ryan Joseph exists ( > https://bugs.freepascal.org/view.php?id=35261 ), but I'v

Re: [fpc-pascal] generic proc inference

2019-10-03 Thread Sven Barth via fpc-pascal
Mattias Gaertner via fpc-pascal schrieb am Do., 3. Okt. 2019, 21:35: > Hi, > > What is the state of FPC support for calling generic procedures using > inference like Delphi? > > For example: > > {$mode objfpc} > generic procedure Run(a: T); > begin > end; > > begin > Run(2); > end. > A patch

Re: [fpc-pascal] fcl-passrc with Objective-c

2019-10-02 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am Mi., 2. Okt. 2019, 16:37: > > > On Wed, 2 Oct 2019, Ryan Joseph wrote: > > > How well can the parser handle the objective-c mode? At my first attempt > it seemed to fail pretty early on so I’m not sure it’s even supported. > > Correct, it is not supported. > > I

Re: [fpc-pascal] threads, memory barriers and RTLeventSetEvent / RTLeventWaitFor

2019-10-01 Thread Sven Barth via fpc-pascal
Martin schrieb am Di., 1. Okt. 2019, 17:19: > I am currently looking at a strange issue in FpDebug. > > The main thread loads a lot of data from a file, and creates various > objects. > > Then some code is executed in a sub-thread. The timing of that > (start/stop of the 2 threads) is handled by

Re: [fpc-pascal] for-in loop cast

2019-09-26 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Do., 26. Sep. 2019, 17:37: > Question I’ve always had. Why do I need to cast “value” to “pointer" > otherwise I get: Incompatible types: got "Pointer" expected “TObject” > error?. I don’t find this very helpful and it doesn’t really make sense > even. > > var > list:

Re: [fpc-pascal] FPC docs about FindFirst

2019-09-22 Thread Sven Barth via fpc-pascal
Ched schrieb am So., 22. Sep. 2019, 21:11: > Hello, > > > Le 22.09.19 à 16:59, Michael Van Canneyt a écrit : > > > > > > On Sun, 22 Sep 2019, AlexeyT wrote: > > > >> https://www.freepascal.org/docs-html/rtl/sysutils/findfirst.html > >> > >> 1) add to the list of attribs the value faAnyFile. > >

<    1   2   3   4   5   6   7   8   9   10   >