Re: [fpc-pascal] Constants in generics

2019-01-03 Thread Sven Barth via fpc-pascal
Am Do., 3. Jan. 2019, 12:58 hat Alexander Shishkin via fpc-pascal < fpc-pascal@lists.freepascal.org> geschrieben: > 03.01.2019 6:32, Ryan Joseph пишет: > > > > > >> On Jan 2, 2019, at 8:25 PM, Alexander Shishkin via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > >> > >> This is not consi

Re: [fpc-pascal] Constants in generics

2019-01-03 Thread Sven Barth via fpc-pascal
Am Do., 3. Jan. 2019, 14:24 hat Alexander Shishkin via fpc-pascal < fpc-pascal@lists.freepascal.org> geschrieben: > 03.01.2019 15:45, Mattias Gaertner via fpc-pascal пишет: > > On Thu, 3 Jan 2019 14:58:00 +0300 > > Alexander Shishkin via fpc-pascal > > wrote: > > > >> [...] > >> This is OK (both

Re: [fpc-pascal] Constants in generics

2019-01-03 Thread Sven Barth via fpc-pascal
Am Do., 3. Jan. 2019, 17:50 hat Ryan Joseph geschrieben: > > > > On Jan 3, 2019, at 6:20 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Correct. ";" separates different parameter types, "," separates those

Re: [fpc-pascal] Constants in generics

2019-01-03 Thread Sven Barth via fpc-pascal
Am 03.01.2019 um 23:14 schrieb Ryan Joseph: On Jan 3, 2019, at 11:33 AM, Sven Barth via fpc-pascal wrote: The approach should be like this: - const is allowed at the start of the parameters or after a ";" - a parameter name is either followed by a ",", ";", &q

Re: [fpc-pascal] Constants in generics

2019-01-05 Thread Sven Barth via fpc-pascal
Am Fr., 4. Jan. 2019, 21:11 hat geschrieben: > On 1/4/19 1:47 PM, Ryan Joseph wrote: > > > >> On Jan 3, 2019, at 11:11 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > >> > >> Fair enough. In that case support for constants

Re: [fpc-pascal] Constants in generics

2019-01-05 Thread Sven Barth via fpc-pascal
Am Sa., 5. Jan. 2019, 17:28 hat Ryan Joseph geschrieben: > > > > On Jan 5, 2019, at 1:18 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > I didn't design the original implementation, but the improvements for > the

Re: [fpc-pascal] Constants in generics

2019-01-06 Thread Sven Barth via fpc-pascal
Am Sa., 5. Jan. 2019, 22:57 hat Ryan Joseph geschrieben: > Here’s the new syntax requirements for const params which require types > and consts be separated by semicolons. > > Does TStuff2 need a ; between the two const params? Sven said consts must > follow ; or < but they’re both consts so I th

Re: [fpc-pascal] Get "disk" ID

2019-01-06 Thread Sven Barth via fpc-pascal
Am Sa., 5. Jan. 2019, 17:05 hat Bart geschrieben: > Hi, > > I need some function to get a unique ID for a disk. > I need this to identify if my program has accessed this disk previously. > > On Windows I can retreive the VolumeSerialNr, but how do I do > something like that in Linux? > Mind you:

Re: [fpc-pascal] Interface bug or some new feature

2019-01-06 Thread Sven Barth via fpc-pascal
Am So., 6. Jan. 2019, 11:42 hat denisgolovan geschrieben: > Hi all > > I've been using 3.1.1 compiler for a long time and now I am trying to > upgrade to 3.3.1 from trunk. > However, I am stuck with some new behavior when using classes + interfaces. > I've managed to reproduce it in a small examp

Re: [fpc-pascal] Interface bug or some new feature

2019-01-06 Thread Sven Barth via fpc-pascal
Am 06.01.2019 um 13:30 schrieb denisgolovan: 06.01.2019, 15:00, "Sven Barth via fpc-pascal" : The default visibility for classes without $M+ is private. Thus TClass1.P is private. An interface implementation does not have access to private methods of a parent class. So you need to

Re: [fpc-pascal] Interface bug or some new feature

2019-01-06 Thread Sven Barth via fpc-pascal
Am 06.01.2019 um 12:56 schrieb Jonas Maebe: On 06/01/19 11:42, denisgolovan wrote: Specifically 3.1.1 compiler compiles it and correctly prints "Double". 3.3.1 compiler refuses to compile it at all. Please comment if it's a bug or a new breaking feature. http://wiki.freepascal.org/User_Change

Re: [fpc-pascal] Constants in generics

2019-01-06 Thread Sven Barth via fpc-pascal
Am So., 6. Jan. 2019, 19:07 hat Ryan Joseph geschrieben: > Last question I have I think. > > Is this the best way to get "pretty name" string for a set? Having to loop > through the entire range of the set is not so great but I don’t see another > way. I feel like there should be some utility fun

Re: [fpc-pascal] Constants in generics

2019-01-06 Thread Sven Barth via fpc-pascal
Am So., 6. Jan. 2019, 22:38 hat Ryan Joseph geschrieben: > Since we introduced “const” keywords to generic params does it make sense > to use an optional “type” keyword also? That just occurred to me as > something worth discussing. No opinion either way except there’s a > inconsistency now which

Re: [fpc-pascal] Small typo in User_Changes_Trunk ?

2019-01-07 Thread Sven Barth via fpc-pascal
Am Mo., 7. Jan. 2019, 08:33 hat LacaK geschrieben: > Hi, > > reading > > http://wiki.freepascal.org/User_Changes_Trunk#Modeswitch_TypeHelpers_in_Delphi_modes_enables_type_helper-syntax > there is: > > Remedy: The only problems arise if one disabled the modeswitch on > purpose which now longer dis

Re: [fpc-pascal] Constants in generics

2019-01-07 Thread Sven Barth via fpc-pascal
Am 07.01.2019 um 02:05 schrieb Ryan Joseph: I updated the github with the requested changes. Is that everything? I’ll submit a patch if so. https://github.com/genericptr/freepascal/tree/generic_constants Looks better. The following points remain: - make sure that you don't have any unrelated

Re: [fpc-pascal] Constants in generics

2019-01-08 Thread Sven Barth via fpc-pascal
Am Di., 8. Jan. 2019, 21:01 hat Ryan Joseph geschrieben: > I’ve made constants respect their proper definition now so we can do range > checking but this broke some other things. For example there’s a range > check error with static arrays now because “U” has a value of 0 so 0-1 = -1: > > type >

Re: [fpc-pascal] Constants in generics

2019-01-08 Thread Sven Barth via fpc-pascal
Am Di., 8. Jan. 2019, 23:49 hat Benito van der Zander geschrieben: > Hi, > > that reminds me of https://bugs.freepascal.org/view.php?id=34232 > Yes, that falls into the same category... Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepa

Re: [fpc-pascal] Constants in generics

2019-01-09 Thread Sven Barth via fpc-pascal
Am Mi., 9. Jan. 2019, 17:03 hat Ryan Joseph geschrieben: > > > > On Jan 8, 2019, at 3:49 PM, Benito van der Zander > wrote: > > > > that reminds me of https://bugs.freepascal.org/view.php?id=34232 > > In this case maybe generics should just not give range errors unless > they’re specialized? Thi

Re: [fpc-pascal] type helpers

2019-01-11 Thread Sven Barth via fpc-pascal
Am Fr., 11. Jan. 2019, 11:24 hat Mattias Gaertner via fpc-pascal < fpc-pascal@lists.freepascal.org> geschrieben: > Hi, > > A type helper can change Self. > I wondered how FPC 3.3.1 handles properties and got some > unexpected results. Is this by design, a bug, or not-yet-implemented? > > {$mode ob

Re: [fpc-pascal] type helpers

2019-01-11 Thread Sven Barth via fpc-pascal
Am Fr., 11. Jan. 2019, 14:52 hat Mattias Gaertner via fpc-pascal < fpc-pascal@lists.freepascal.org> geschrieben: > On Fri, 11 Jan 2019 14:27:13 +0100 > Sven Barth via fpc-pascal wrote: > > >[...] > > This is by design. In this case DoIt is called on a temp variable &

Re: [fpc-pascal] inlining functions

2019-01-12 Thread Sven Barth via fpc-pascal
Am Sa., 12. Jan. 2019, 13:05 hat denisgolovan geschrieben: > > However, what you actually can do, is manually recompile all units of > your program > > multiple times. While this won't help with inline functions called > > before they are parsed in those same units, it will allow inlining of > >

Re: [fpc-pascal] type helper constructor

2019-01-17 Thread Sven Barth via fpc-pascal
Am Do., 17. Jan. 2019, 13:10 hat Mattias Gaertner via fpc-pascal < fpc-pascal@lists.freepascal.org> geschrieben: > Hi, > > A type helper for a string can add a constructor. > But how it can be used differs between FPC and Delphi. > > For example: > > {$modeswitch typehelpers} > type > THelper =

Re: [fpc-pascal] type helper default property

2019-01-17 Thread Sven Barth via fpc-pascal
Am 17.01.2019 um 13:17 schrieb Mattias Gaertner via fpc-pascal: Hi, For example: type THelper = type helper for string function GetItems(Index: word): word; property Items[Index: word]: word read GetItems; default; end; Delphi forbids this with "'default' directive not allowed i

Re: [fpc-pascal] trying to use C code in .pas on WIN32

2019-01-24 Thread Sven Barth via fpc-pascal
Am Fr., 25. Jan. 2019, 01:01 hat Marc Santhoff geschrieben: > On Wed, 2019-01-23 at 14:30 -0700, conlin664 via fpc-pascal wrote: > > I've done research, but am just missing something. > > my .pas code links just fine, but doesn't RUN. > > ( first writeln never appears ) > > If I remove the exter

Re: [fpc-pascal] trying to use C code in .pas on WIN32

2019-01-30 Thread Sven Barth via fpc-pascal
Am 30.01.2019 um 23:14 schrieb conlin664 via fpc-pascal: ok. I backed up to a simple version. how I declare the C routine must be the problem, with nothing, procedure HelloC; cdecl; external; I think it's trying to static link it, and gets an pcode.pas(19,1) Error: Undefined symbol: _He

Re: [fpc-pascal] trying to use C code in .pas on WIN32

2019-01-31 Thread Sven Barth via fpc-pascal
Am Do., 31. Jan. 2019, 15:26 hat Bart geschrieben: > On Thu, Jan 31, 2019 at 7:35 AM Sven Barth via fpc-pascal > wrote: > > > > This is on an evil windows machine > > Windows is one of FPC's main targets, we can do without such > "expletives". > &

Re: [fpc-pascal] h2pas fails on c++ header file

2019-01-31 Thread Sven Barth via fpc-pascal
Am Do., 31. Jan. 2019, 17:38 hat Giuliano Colla < giuliano.co...@fastwebnet.it> geschrieben: > Il 30/01/2019 13:17, Marco van de Voort ha scritto: > > > > > Op 1/30/2019 om 11:57 AM schreef Giuliano Colla: > >> > >> What I'm doing wrong? > >> > > Using a C header converter or a C++ header file.

Re: [fpc-pascal] trying to use C code in .pas on WIN32

2019-01-31 Thread Sven Barth via fpc-pascal
Am Do., 31. Jan. 2019, 22:03 hat Marc Santhoff geschrieben: > On Thu, 2019-01-31 at 11:00 -0700, conlin664 via fpc-pascal wrote: > > sven, > > > > so I just tried, what I think you said: > > > > procedure HelloC; cdecl; external name 'HelloC'; > > > > pcode.pas(19,1) Error: Undefined symbol: _Hel

Re: [fpc-pascal] Question: Is there a global callback, when a thread gets terminated?

2019-02-12 Thread Sven Barth via fpc-pascal
Am Di., 12. Feb. 2019, 16:56 hat Marc Santhoff geschrieben: > On Mon, 2019-02-11 at 10:21 +, Michael Schnell wrote: > > > Yes, but how do I get notified, when the thread is gone, and I can free > > > the > > > memory (of the object that was created)? > > > > Ah, now I finally see the problem

Re: [fpc-pascal] StrUtils unit needs Widestring funcs

2019-02-15 Thread Sven Barth via fpc-pascal
Am Fr., 15. Feb. 2019, 18:54 hat Michael Van Canneyt geschrieben: > > I intend to copy it to ustrutils, which will be compiled with widestrings. > Copying all routines to handle ansi/wide string is no solution. > I hope you mean UnicodeString? The only platform where this is important is Windows

Re: [fpc-pascal] Constants in generics tests

2019-02-15 Thread Sven Barth via fpc-pascal
Am Fr., 15. Feb. 2019, 20:58 hat Ryan Joseph geschrieben: > > > > On Feb 15, 2019, at 2:11 PM, Ryan Joseph > wrote: > > > > Also I just noticed that I’m getting warnings from the “U” constant > which is declared in the “strict private” section (Private const > "TTest$1.U" never used). That needs

Re: [fpc-pascal] Constants in generics tests

2019-02-15 Thread Sven Barth via fpc-pascal
Am Fr., 15. Feb. 2019, 21:54 hat Ryan Joseph geschrieben: > > > > On Feb 15, 2019, at 2:11 PM, Ryan Joseph > wrote: > > > > Something with class functions in particular. Very strange it can’t find > the declaration. So never mind about submitting, I need to fix this now. :) > > I just looked ove

Re: [fpc-pascal] Constants in generics tests

2019-02-16 Thread Sven Barth via fpc-pascal
Am 15.02.2019 um 23:00 schrieb Ryan Joseph: On Feb 15, 2019, at 4:19 PM, Sven Barth via fpc-pascal wrote: It could be that the method body is not generated. Look for generate_specialization_procs in pgenutil as that is what generates the bodies at the end of a unit (simplified). Really

Re: [fpc-pascal] Constants in generics tests

2019-02-16 Thread Sven Barth via fpc-pascal
Am Sa., 16. Feb. 2019, 15:34 hat Ryan Joseph geschrieben: > > > > On Feb 16, 2019, at 3:33 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > While you're at it, you should probably also ensure that internal error > 20140

Re: [fpc-pascal] FGL.TFPSList Find method needed (binary search)

2019-02-16 Thread Sven Barth via fpc-pascal
Am Sa., 16. Feb. 2019, 21:30 hat AlexeyT geschrieben: > Hello. Can you pls, add Sorted property to TFPSList / TFPGList (Add() > method must sort newly added item), and also Find method (which must use > binary search in Sorted case, and use plain loop if not sorted) > You could also check whethe

Re: [fpc-pascal] Multi helpers

2019-02-25 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Mo., 25. Feb. 2019, 19:00: > Question, is this mode switch allowed in Delphi mode? I disabled it > because I had a comment that said it was ObjFPC mode only but that doesn’t > make sense it couldn’t be enabled manually even in Delphi mode. > Mattias already answered, but n

Re: [fpc-pascal] Multi helpers

2019-02-25 Thread Sven Barth via fpc-pascal
Mattias Gaertner via fpc-pascal schrieb am Mo., 25. Feb. 2019, 19:09: > On Mon, 25 Feb 2019 12:49:16 -0500 > Ryan Joseph wrote: > > > > On Feb 25, 2019, at 12:41 PM, Mattias Gaertner via fpc-pascal > > > wrote: > > > > > > At least FPC helpers are more consistent than Delphi. > > > inherited cr

Re: [fpc-pascal] Multi helpers

2019-02-25 Thread Sven Barth via fpc-pascal
Am 25.02.2019 um 19:44 schrieb Sven Barth: Mattias Gaertner via fpc-pascal > schrieb am Mo., 25. Feb. 2019, 19:09: On Mon, 25 Feb 2019 12:49:16 -0500 Ryan Joseph mailto:r...@thealchemistguild.com>> wrote: > > On Feb 25, 2019, at 12:41 PM, Mat

Re: [fpc-pascal] CGI with datamodule does not work

2019-02-26 Thread Sven Barth via fpc-pascal
Am 27.02.2019 um 01:42 schrieb AB: Hi Guys, I have tried to update my old web project that is in maintenance mode since a few years now, using the latest stable Lazarus/FPC, and fcl-web just does not want to work (Tried Lazarus 1.8.4/FPC 3.0.4, Lazarus 2.0.0/FPC 3.0.4 with Apache 2.4, on Linu

Re: [fpc-pascal] Multi helpers

2019-02-27 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Do., 28. Feb. 2019, 03:50: > posts getting blocked again, just sending this to see if it gets through. > > > On Feb 26, 2019, at 9:10 AM, Ryan Joseph > wrote: > > > > > > > >> On Feb 26, 2019, at 7:05 AM, Graeme Geldenhuys < > mailingli...@geldenhuys.co.uk> wrote: > >> > >

Re: [fpc-pascal] Multi helpers

2019-02-28 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Do., 28. Feb. 2019, 15:37: > > > > On Feb 28, 2019, at 1:51 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Yes, though the first step should probably be to rework your commits. > It's a bit of work

Re: [fpc-pascal] Registers used by calling conventions

2019-03-09 Thread Sven Barth via fpc-pascal
Anthony Walter schrieb am Fr., 8. März 2019, 22:34: > What registers are used by default calling convention and where can I find > more information about Free Pascal asm details? > > When writing code using the asm block on Delphi in Windows, the default > calling convention (fastcall) would pass

Re: [fpc-pascal] fpdoc: what does the --marco parameter do?

2019-03-23 Thread Sven Barth via fpc-pascal
Graeme Geldenhuys schrieb am Sa., 23. März 2019, 17:40: > On 23/03/2019 16:34, Graeme Geldenhuys wrote: > > I'm trying to debug fpdoc, but for the life of me, I can't get Lazarus > > to step into the code other than the program unit's main code block. > > Got this part sorted - MSEide to the resc

Re: [fpc-pascal] Compile for WinCE 7, target ARM, CPU Cortex-A9

2019-04-05 Thread Sven Barth via fpc-pascal
LacaK schrieb am Fr., 5. Apr. 2019, 13:18: > > > Note that you probably don't need two different cross compilers if your > cpu-OS target is the same > > Target CPU family is same: "arm", but Target processor is not the same: > "ARMv4" versus "ARMv7" ... > > So I do not know if this requires two p

Re: [fpc-pascal] Compile for WinCE 7, target ARM, CPU Cortex-A9

2019-04-05 Thread Sven Barth via fpc-pascal
LacaK schrieb am Fr., 5. Apr. 2019, 14:56: > > >> >> Note that you probably don't need two different cross compilers if your >> cpu-OS target is the same >> >> Target CPU family is same: "arm", but Target processor is not the same: >> "ARMv4" versus "ARMv7" ... >> >> So I do not know if this requ

Re: [fpc-pascal] Using TInterfaceList and casting interfaces

2019-04-07 Thread Sven Barth via fpc-pascal
Benito van der Zander schrieb am So., 7. Apr. 2019, 15:34: > Writing (list.get(0) as ISomeInterface), is very slow and not possible, > when the interface has no GUID. > This is indeed what is supposed to be used with TInterfaceList. Or perhaps it is better to use gvector rather than TInterfaceL

Re: [fpc-pascal] strict private construct

2019-04-12 Thread Sven Barth via fpc-pascal
Graeme Geldenhuys schrieb am Fr., 12. Apr. 2019, 14:20: > On 12/04/2019 13:10, Graeme Geldenhuys wrote: > > On 12/04/2019 12:40, Mattias Gaertner via fpc-pascal wrote: > >> I get: > >> test1.pas(26,8) Error: identifier idents no member "FDropDown" > > > > It works in Delphi 10.2.3 > > > Ah wait,

Re: [fpc-pascal] mode switch madness

2019-04-12 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Fr., 12. Apr. 2019, 16:37: > > > > On Apr 12, 2019, at 10:15 AM, Michael Van Canneyt < > mich...@freepascal.org> wrote: > > > > That would break with the rule that directives do not cross unit > boundaries. > > It has far-reaching consequences. > > > > Better introduce a co

Re: [fpc-pascal] Optional param modifier

2019-04-13 Thread Sven Barth via fpc-pascal
Marco van de Voort schrieb am Fr., 12. Apr. 2019, 20:56: > > Op 2019-04-12 om 17:23 schreef Ryan Joseph: > > > > What do you think of that? Sounds like an easy way to get some support > for nil pointers deref’s and provides self documenting code. > > I think the same as when I read the suggestion

Re: [fpc-pascal] Optional param modifier

2019-04-13 Thread Sven Barth via fpc-pascal
On 4/13/19 11:39 PM, Martin Frb wrote: > On 13/04/2019 23:17, Ryan Joseph wrote: >> If there was any other way the compiler could make this contract more >> concrete and reliable then comments I’d be happy to hear it. > > I don't know what others think of it, but > https://en.wikipedia.org/wiki/De

Re: [fpc-pascal] Optional param modifier

2019-04-14 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am So., 14. Apr. 2019, 00:17: > > > > On Apr 13, 2019, at 6:01 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > Well, there is Oxygene's concept of Class Contracts (see > > https://docs.elementsco

Re: [fpc-pascal] mode switch madness

2019-04-14 Thread Sven Barth via fpc-pascal
Am 14.04.2019 um 04:07 schrieb Ben Grasset: I dunno about setting them globally, but generally I do find modeswitches rather annoying, as the combination of features is pretty arbitrary, and they mostly just *disallow* things that couldn't break the code of people who weren't using those featur

Re: [fpc-pascal] mode switch madness

2019-04-14 Thread Sven Barth via fpc-pascal
Am 14.04.2019 um 17:03 schrieb Ryan Joseph: On Apr 13, 2019, at 10:07 PM, Ben Grasset wrote: E.G, I sincerely doubt that anybody has *ever* thought, "man, I sure am glad that {$mode ObjFPC} does not allowed advanced records. It would be specifically bad if it did!" because it just doesn't m

Re: [fpc-pascal] Optional param modifier

2019-04-14 Thread Sven Barth via fpc-pascal
Am 14.04.2019 um 16:05 schrieb Ryan Joseph: On Apr 14, 2019, at 3:15 AM, Sven Barth via fpc-pascal wrote: Your idea requires exceptions as well. The compiler is not capable checking whether valid entries are passed in at compile time except for simple, constant cases, so runtime checks are

Re: [fpc-pascal] Optional param modifier

2019-04-15 Thread Sven Barth via fpc-pascal
Am 15.04.2019 um 01:19 schrieb Ryan Joseph: On Apr 14, 2019, at 7:08 PM, Martin Frb wrote: Almost. assert takes the condition itself assert(condition_that_must_be_true, 'error message') so it would be assert(name<>'', 'requires "name <> " failed for CreateHero'); You can already ins

Re: [fpc-pascal] Optional param modifier

2019-04-15 Thread Sven Barth via fpc-pascal
Am 14.04.2019 um 23:48 schrieb Martin Frb: As for "documentation". I disagree with the way it is done in oxygen. But I am not sure I have any good alternative. For me a class contract (require/ensure) is part of the interface. So it would have to be like (and similar for plain procedures, no c

Re: [fpc-pascal] Can FPC optimize: if (s[i]='a') or ...

2019-04-15 Thread Sven Barth via fpc-pascal
Am 15.04.2019 um 09:06 schrieb Bernd Oppolzer: Am 15.04.2019 um 08:29 schrieb Tomas Hajny: On Mon, April 15, 2019 07:52, Bernd Oppolzer wrote:   .   . On Samstag, 13. April 2019 22:30:55 CEST Alexey Tor. wrote:   .   . Can FPC optimize it so it only reads s[i] once (to register), not 3 times?

Re: [fpc-pascal] Lazarus Release 2.0.2 - suggestions

2019-04-16 Thread Sven Barth via fpc-pascal
Rainer Stratmann schrieb am Di., 16. Apr. 2019, 13:47: > Are there plans to merge some windows? > > Like here (best solution): > https://cdn.portableapps.com/GeanyPortable.png > > Because I think it is no more up to date. > I don't know any other Software that uses so many windows across the whol

Re: [fpc-pascal] Really Strange Speed Problems - FPC & Neural Networks

2019-04-17 Thread Sven Barth via fpc-pascal
Am 17.04.2019 um 10:01 schrieb Joao Schuler: Hello, It's better not to reply to an existing mail with a completely new topic, cause now your mail is burrowed deep in the "Lazarus Release 2.0.2" thread. Better write directly to the list without replying. Regards, Sven _

Re: [fpc-pascal] how to customize so Pandroid would be usable from Lazarus for windows

2019-04-18 Thread Sven Barth via fpc-pascal
Am 18.04.2019 um 12:46 schrieb Tomas Hajny: On Thu, April 18, 2019 12:32, Mgr. Janusz Chmiel wrote: . . I have also started to transform build.sh to Windows batch file. Which issues AM I facingnow? . . echo ppcjvm - $TYPHON/fpc/fpc64/bin/x86_

Re: [fpc-pascal] Resolving math expression as input from user

2019-04-23 Thread Sven Barth via fpc-pascal
Am 23.04.2019 um 12:04 schrieb James Richters: I'm trying to figure out if there is some function available that would take a string as input and return a double value that is the complete evaluation of the string? So when asked for a numeric input, the user could just put in a number like 6.

Re: [fpc-pascal] Record helper properties

2019-04-23 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Di., 23. Apr. 2019, 21:54: > So I remember now that any fields are not allowed in helpers. Can anyone > explain why this must be the case or if it could be fixed? > A helper can not access its extended type in its interface, only in its implementation (and yes, this gets i

Re: [fpc-pascal] Record helper properties

2019-04-24 Thread Sven Barth via fpc-pascal
Am 24.04.2019 um 15:28 schrieb Ryan Joseph: On Apr 24, 2019, at 2:27 AM, Michael Van Canneyt wrote: I would think this should be allowed, yes. I see no reason to disallow it. Agreed but Sven says something about published fields though. The property just acts as simple alias so I don’t unde

Re: [fpc-pascal] class operator enumerator

2019-04-24 Thread Sven Barth via fpc-pascal
Am 24.04.2019 um 15:31 schrieb Ryan Joseph: On Apr 24, 2019, at 12:30 AM, Ben Grasset wrote: Seems like it's mixed up in some way with the FPC-style enumerator operator, so the "class" version is recognized but not actually implemented currently or something. The normal way for classes/rec

Re: [fpc-pascal] fpc 3.2: "Declaration of type TTypeList changed"

2019-04-26 Thread Sven Barth via fpc-pascal
Am 25.04.2019 um 22:23 schrieb Luca Olivetti: Hello, as per the subject, I've been bitten by this change: http://wiki.freepascal.org/User_Changes_Trunk#Declaration_of_type_TTypeList_changed This code (FTasks is a specialization of TFPGList)   for i:=0 to FTasks.Count-1 do   begin     FTas

Re: [fpc-pascal] TThread.OnTerminate never called

2019-04-26 Thread Sven Barth via fpc-pascal
Am 21.04.2019 um 18:22 schrieb Dennis: I am using FPC 3.0.4 Lazarus 2.00 on windows 64 I created a subclass of TThread and found out that the TThread.OnTerminate event was never called (I already assigned it). Also, I search the source code of TThread in classeh.inc and found that there was no

Re: [fpc-pascal] Improve message "Wrong ppu found"

2019-04-26 Thread Sven Barth via fpc-pascal
Am 24.04.2019 um 10:14 schrieb Alexey Tor.: Suggestion: in the message $subj, can you add FPC version of that PPU? so it will be "Wrong PPU found [FPC 2.7.8]" when FPC needs PPU for 3.2.0. Please provide a real example of a compiler output, cause I can't find "Wrong ppu found" in the sources.

Re: [fpc-pascal] TThread.OnTerminate never called

2019-04-26 Thread Sven Barth via fpc-pascal
Dennis schrieb am Sa., 27. Apr. 2019, 05:22: > > > Sven Barth via fpc-pascal wrote: > > Am 21.04.2019 um 18:22 schrieb Dennis: > >> I am using FPC 3.0.4 Lazarus 2.00 on windows 64 > >> > >> I created a subclass of TThread and found out that the > >

Re: [fpc-pascal] Improve message "Wrong ppu found"

2019-04-27 Thread Sven Barth via fpc-pascal
leledumbo via fpc-pascal schrieb am Sa., 27. Apr. 2019, 15:14: > > Please provide a real example of a compiler output, cause I can't find > "Wrong ppu found" in the sources. > > I think what he meant is: > > $ grep -i 'wrong ppu version' -r * > pkgutil.pas: Comment(V_Error,'Wrong PPU Vers

Re: [fpc-pascal] Does FPC require glibc?

2019-05-06 Thread Sven Barth via fpc-pascal
Nozz via fpc-pascal schrieb am Mo., 6. Mai 2019, 22:18: > Empty Message > Depends on what you're using (and the platform). E.g. the compiler itself runs without glibc on Linux, but if you need to use threads for example that changes. Also if you link against libraries like GTK or Qt you also ind

Re: [fpc-pascal] Does FPC require glibc?

2019-05-06 Thread Sven Barth via fpc-pascal
Am 07.05.2019 um 00:16 schrieb Nozz via fpc-pascal: On Monday, May 6, 2019 10:48 PM, Sven Barth wrote: Nozz via fpc-pascal > schrieb am Mo., 6. Mai 2019, 22:18: Empty Message Depends on what you're using (and the platform). E.g. the compiler it

Re: [fpc-pascal] Does FPC require glibc?

2019-05-07 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am Di., 7. Mai 2019, 08:32: > > > On Mon, 6 May 2019, Nozz via fpc-pascal wrote: > > > On Monday, May 6, 2019 10:48 PM, Sven Barth > wrote: > > > >> Nozz via fpc-pascal schrieb am Mo., > 6. Mai 2019, 22:18: > >> > >>> Empty Message > >> > >> Depends on what you're us

Re: [fpc-pascal] Turbo Pascal 3 graphics

2019-05-08 Thread Sven Barth via fpc-pascal
Kevin Lyda schrieb am Mi., 8. Mai 2019, 10:58: > Amazingly I still have a number of my high school computer science > projects which were written in Turbo Pascal 3. And a few are almost > not horribly embarrassing. > > I'd like to port them to fpc and write up the experience but I know > what the

[fpc-pascal] Feature Announcement: Support for multiple active helpers per type

2019-05-10 Thread Sven Barth via fpc-pascal
Hello together! We are pleased to announce that Free Pascal now supports the usage of multiple active helper types per extended type. This feature has been developed by Ryan Joseph, so thank you very much Ryan. To enable this feature you need to use the new modeswitch multihelpers. This will

Re: [fpc-pascal] Feature Announcement: Support for multiple active helpers per type

2019-05-10 Thread Sven Barth via fpc-pascal
Am 10.05.2019 um 22:21 schrieb Mattias Gaertner via fpc-pascal: On Fri, 10 May 2019 21:56:56 +0200 Sven Barth via fpc-pascal wrote: [...] We are pleased to announce that Free Pascal now supports the usage of multiple active helper types per extended type. This feature has been developed by

Re: [fpc-pascal] Problem linking external libs on Linux

2019-05-12 Thread Sven Barth via fpc-pascal
Anthony Walter schrieb am So., 12. Mai 2019, 18:41: > For example suppose I want to write some pascal code linking to an > external functions like so: > > const > libsdl2 = 'libSDL2-2.0.so.0'; > > function SDL_Init(flags: Uint32): LongInt; cdecl; external libsdl2; > procedure SDL_Quit; cdecl; e

Re: [fpc-pascal] Problem linking external libs on Linux

2019-05-12 Thread Sven Barth via fpc-pascal
Anthony Walter schrieb am So., 12. Mai 2019, 20:42: > Okay, so I need to install the dev versions of any package I want to link > against. But when my program is distributed it will link at load time > correctly to the non dev versions. > It links against the version the development version link

Re: [fpc-pascal] dot net dll in free pascal?

2019-05-13 Thread Sven Barth via fpc-pascal
Luca Olivetti schrieb am Mo., 13. Mai 2019, 23:14: > A sizeable part of my day job is to program PLCs in the worst software > environment ever (for the curious, simatic tia portal, actually I'm > mostly using the older, only marginally better, step 7, but the times > they are a-changin'). > Said

Re: [fpc-pascal] dot net dll in free pascal?

2019-05-14 Thread Sven Barth via fpc-pascal
Luca Olivetti schrieb am Di., 14. Mai 2019, 09:13: > El 14/5/19 a les 0:15, Sven Barth via fpc-pascal ha escrit: > > > The file command under Linux says: > > Siemens.Engineering.dll: PE32 executable (DLL) (console) Intel 80386 > > Mono/.Net assembly, for MS

Re: [fpc-pascal] unexpected termination with no errors

2019-05-15 Thread Sven Barth via fpc-pascal
Karoly Balogh (Charlie/SGR) schrieb am Mi., 15. Mai 2019, 15:25: > Hi, > > On Wed, 15 May 2019, James Richters wrote: > > > Has anyone encountered anything like this before or know how I can make > > sure I always get the maximum amount of debugging info when my program > > crashes? > > Is it a s

Re: [fpc-pascal] unexpected termination with no errors

2019-05-15 Thread Sven Barth via fpc-pascal
Karoly Balogh (Charlie/SGR) schrieb am Mi., 15. Mai 2019, 18:40: > Hi, > > On Wed, 15 May 2019, Sven Barth via fpc-pascal wrote: > > >> (Sidenote: I've been pondering for a while if I should report this as a > >> bug. I think the RTL should put a

Re: [fpc-pascal] Detecting console close with red X on windows

2019-05-19 Thread Sven Barth via fpc-pascal
James Richters schrieb am So., 19. Mai 2019, 19:10: > Thanks!That was quite helpful! I have a test program kind of > working. > > I notice I only get 5 seconds to do what I am going to before it closes, > and I also notice that my program can no longer respond to keystrokes after > I hit t

Re: [fpc-pascal] Checking if a TStringList already exists

2019-05-20 Thread Sven Barth via fpc-pascal
James Richters schrieb am Mo., 20. Mai 2019, 15:23: > Thank you very much for the explanation and examples of this! I am glad > you pointed out the FreeAndNill() function, I will defiantly be needing > that. > Though you need to keep in mind that only that single variable will be set to Nil. S

Re: [fpc-pascal] Checking if a TStringList already exists

2019-05-21 Thread Sven Barth via fpc-pascal
James Richters schrieb am Di., 21. Mai 2019, 15:48: > I don’t seem to have FreeThenNil I’m using FPC 3.0.4RC1 I don’t use > Lazarus.. maybe it’s a Lazarus thing… or maybe it’s in a different unit > Correct, it's part of Lazarus. Regards, Sven > ___

Re: [fpc-pascal] Convert codepages back to UTF8

2019-05-27 Thread Sven Barth via fpc-pascal
Alexey Tor. schrieb am Mo., 27. Mai 2019, 13:15: > LazUtils.LConvEncoding can convert utf8 to codepage (not many codepages) > and vice versa. > > FPC 3 can convert utf8 to codepage - via SetCodePage(s, codepage, true). > But how can FPC convert back - codepage to utf8? Does such way exist? > Use

Re: [fpc-pascal] Convert codepages back to UTF8

2019-05-28 Thread Sven Barth via fpc-pascal
Martok schrieb am Mo., 27. Mai 2019, 15:14: > Am 27.05.2019 um 14:30 schrieb Sven Barth via fpc-pascal: > > Alexey Tor. > <mailto:aaa5...@ya.ru>> schrieb am Mo., 27. Mai 2019, 13:15: > > > > LazUtils.LConvEncoding can convert utf8 to codepage (not many &g

Re: [fpc-pascal] Convert codepages back to UTF8

2019-05-28 Thread Sven Barth via fpc-pascal
Alexey Tor. schrieb am Di., 28. Mai 2019, 14:44: > Ok, I got it. But I wonder: if my code changes codepage of a "string" to > e.g. 1250, will all Lazarus string functions work ok with such changed > string? For ex, will Pos('Петя', s) work? > Depends on what you do with the returned value. Lazar

Re: [fpc-pascal] Class field property access

2019-06-03 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Mo., 3. Juni 2019, 16:36: > I found a restriction in properties which is a little disappointing. I get > there’s probably some objective of safety but Pascal is a direct memory > access language so I don’t understand why properties have this unique > restriction when I coul

Re: [fpc-pascal] Error? No range checks in mode delphi?

2019-06-03 Thread Sven Barth via fpc-pascal
Anthony Walter schrieb am Di., 4. Juni 2019, 03:27: > That fixes it, but then the question is why does {$mode delphi} differ > from {$mode objfpc}? > Mode ObjFPC is stricter in some cases. While mode Delphi cares for Delphi compatibility. Regards, Sven __

Re: [fpc-pascal] Class field property access

2019-06-07 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am Fr., 7. Juni 2019, 08:52: > > This appears to be a regression since 3.0.4 also. Did you specifically > > disable this in 3.3.1? Sorry I’m not understanding this one. > > If it was allowed in previous versions, this was by accident allowed during > parsing and most

Re: [fpc-pascal] Class field property access

2019-06-07 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Fr., 7. Juni 2019, 14:00: > > > > On Jun 7, 2019, at 2:51 AM, Michael Van Canneyt > wrote: > > > > What kind of behaviour are you referring to. > > Something wrong with my mail server causing your server to block me (Jonas > said my server didn’t handle greylisting correct

Re: [fpc-pascal] OpenBSD platform define

2019-06-21 Thread Sven Barth via fpc-pascal
Alexey Tor. schrieb am Fr., 21. Juni 2019, 13:10: > I cannot find such in the https://wiki.freepascal.org/Platform_defines - > its missed? > It's missing in the listing as is DragonFlyBSD and some others (e.g. the three supported Nintendo consoles). Regards, Sven >

[fpc-pascal] Troubles with SQLDBRESTBridge

2019-06-21 Thread Sven Barth via fpc-pascal
Hello together! I've played around a bit with the SQLDBRESTBridge and encountered some troubles which I wanted to check up here on the list whether those are indeed bugs or not before reporting them to Mantis. For the tests I've used FPC 3.0.4 and Lazarus 2.0 with the SQLDBRESTBridge and the Laza

Re: [fpc-pascal] Troubles with SQLDBRESTBridge

2019-06-22 Thread Sven Barth via fpc-pascal
Am 22.06.2019 um 10:30 schrieb Michael Van Canneyt: On Fri, 21 Jun 2019, Sven Barth via fpc-pascal wrote: Hello together! I've played around a bit with the SQLDBRESTBridge and encountered some troubles which I wanted to check up here on the list whether those are indeed bugs or not b

Re: [fpc-pascal] Troubles with SQLDBRESTBridge

2019-06-23 Thread Sven Barth via fpc-pascal
Am 23.06.2019 um 00:50 schrieb Michael Van Canneyt: On Sat, 22 Jun 2019, Sven Barth via fpc-pascal wrote: The REst Module has the additional disadvantage that you must have an initial /REST/ or whatever part in your URL. With the dispatcher on a datamodule, you can skip this if so desired

Re: [fpc-pascal] Troubles with SQLDBRESTBridge

2019-06-23 Thread Sven Barth via fpc-pascal
Am 23.06.2019 um 11:31 schrieb Michael Van Canneyt: On Sun, 23 Jun 2019, Sven Barth via fpc-pascal wrote: Okay, independently of whether the REST module is the optimal solution or not, it should work, right? (and shouldn't the Wiki entry then mention the advantages/disadvantages of th

Re: [fpc-pascal] why isn't the 'exit' in the finally end clause executed?

2019-06-23 Thread Sven Barth via fpc-pascal
Am 23.06.2019 um 16:33 schrieb Jonas Maebe: On 23/06/2019 09:08, Dennis wrote: Using fpc 3.0.4, Lazarus 2.0, the following simple program program tryfinally; begin   try     Writeln('before finally');   finally Writeln('inside finally. Before Exit'); exit; //

Re: [fpc-pascal] Troubles with SQLDBRESTBridge

2019-06-24 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am Mo., 24. Juni 2019, 09:30: > > > On Sun, 23 Jun 2019, Sven Barth via fpc-pascal wrote: > > >>>>> - localhost:8080/metadata works > >>>>> - localhost:8080/users returns "INVALID RESOURCE" > >>

Re: [fpc-pascal] String conversions

2019-06-26 Thread Sven Barth via fpc-pascal
Am 26.06.2019 um 23:36 schrieb Ryan Joseph: On Jun 26, 2019, at 3:28 PM, Ben Grasset wrote: I think Ryan probably meant his own custom types. And certainly, you can do some interesting stuff with operator overloading that mostly avoids the normal AnsiString overhead. Here's an example. Yes

Re: [fpc-pascal] String conversions

2019-06-26 Thread Sven Barth via fpc-pascal
Am 27.06.2019 um 07:10 schrieb Sven Barth: Am 26.06.2019 um 23:36 schrieb Ryan Joseph: On Jun 26, 2019, at 3:28 PM, Ben Grasset wrote: I think Ryan probably meant his own custom types. And certainly, you can do some interesting stuff with operator overloading that mostly avoids the normal

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